- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi all, i got this really strange problem on some CSS code im trying to replicate of a tutorial.
Problem:
i’m using the excact same text as the tutorial but the CSS style is playing a hard-trick on me here.
Some of the code wont exectute, so it doesnt position the “logo” where i want it.
but if i change the name of “#logo-working” to “#logo” – and vice versa. then it works just fine.
The #logo-working – is a copy/paste from the tutorial, the other one from my own copy in text-mate.
code:
#logo {
position: absolute;
top: -25px;
left: -50px;
background: url(../images/logo.png) no-repeat;
width: 295px;
height: 191px;
}
#logo-working {
position: absolute;
top: -25px;
left: -50px;
background: url(../images/logo.png) no-repeat;
width: 295px;
height: 191px;
}
Was the “-” in the tutorial? In the id name.
No, the #logo-working and #logo is just so that you could see what was what.
The ID in the html is logo –
My “#logo” style brings the image to the page. but it doesnt do any positioning.
but if i remove my #logo code and replaces it with #logo-working (and changing the name of the id in the css to #logo aswell” the it works.
I found the solution to my problem – the encoding that my textmate saved the file in was wrong, so there was some kind of character (invisible) that the css didnt like.