| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| DesignersTalk > Stupid IE... problems with background image |
|
LinkBack | Thread Tools | Search this Thread |
|
|
#1 (permalink) |
|
Registered User
Join Date: Dec 2004
Posts: 42
|
Stupid IE... problems with background image
Hey there, this is my first post here and a bit of a CSS layout problem. Okay, I've got this <div> that I want at a height of 8 pixels with a background image. It all works just fine in Firefox, but in IE there seems to be an imaginary 11 pixel margin added to the bottom of it. Just how it should be in Firefox: ![]() In IE with imaginary bottom margin: ![]() Code:
Anyone got any ideas on this? |
|
|
|
|
|
#2 (permalink) |
|
Royalty™
Join Date: Feb 2003
Location: Manchester (UK)
Posts: 3,242
|
At a guess, would it be the old box model thing? since I've seen it posted here X number of times. Honestly though. I dont have a clue as Im not a web designer... http://tantek.com/CSS/Examples/boxmodelhack.html |
|
|
|
#3 (permalink) |
|
volkswagen yellow & gold
Join Date: Apr 2003
Location: london, england.
Posts: 6,147
|
no, its the ie 3px gap bug thing. maybe something here for you: http://www.positioniseverything.net/...reepxtest.html |
|
|
|
#7 (permalink) | |
|
Registered User
Join Date: Dec 2004
Posts: 42
|
Quote:
Thanks anyway to both of you. |
|
|
|
|
#10 (permalink) |
|
Registered User
Join Date: Dec 2004
Posts: 42
|
Maybe this can tell you something: Code:
It's this one: Code:
|
|
|
|
#12 (permalink) |
|
Registered User
Join Date: Dec 2004
Posts: 42
|
CRACKED IT!!! I've got it working... not sure if it's "proper" but it works! I changed the font-size 6px and it now works. It seems like the default text size was pushing the height of the <div> an extra few pixels (even though there was no text). At first I changed it to 8px but there was still an extra 2 pixels, so then I put it to 6px and it works just fine. Any thoughts on that? |
|
|
|
#15 (permalink) |
|
Registered User
Join Date: Dec 2004
Posts: 42
|
Actually, should I size fonts using em? My reason for using px for font-size is that the appearance of the design is not compromised. It always looks how I want it to. Em on the otherhand changes the size of the font according to the user's browser preference. As a designer it annoys me that I have no control over that element of page display... but it's important for all this standards stuff is it not? I mean, when I tested my page using 1em it looked horrible. |
|
|
|
#17 (permalink) |
|
Registered User
Join Date: Dec 2004
Posts: 42
|
Aha, so you can actually make the ems-sized type look nice. Thanks for that link. Er, does this mean that it allows for resizing while not being subject to somebody's default font-size? --------------------------------------------------------------------------------------------------------------- BTW, I've just encountered a cross-browser difference regarding padding. Say, for instance, I add 50px of padding to the left side of a <div>. In Firefox the padding extends the size of the the <div> by 50px, sort of working "outwards"... while in Explorer, the padding cuts into the <div> working "inwards". Is that normal between the two browsers, or just something brought on by bad coding? |
|
|
|
#20 (permalink) |
|
dt immigrant
|
I am using this method on my site and it works fine I don't know which of the two is more reliable, but in my oppinion setting the default font size to 0px ( body {font-size:0px;} as I understand) might pose some accessibility issues (when you try to resize the text in your browser) and it would probabily mean some more coding for you (you would have to set a font size for each of your divs that you want to actually display some text ) keep it up |
|
![]() |