IE issue - background centring and div centring
Okay this is annoying - I've got a background centred and repeated down the page in my body CSS to create a drop shadow frame for the website. My content is in DIV tags also centred to the page which is fine in FF but in IE it is offsetting the content or background by a pixel putting a white line down the right hand side of the page and cutting the drop shadow short on the left hand side of the page... HUH!?
This is it here: http://www.ajrdesigner.co.uk/work/na/
The Definitive solution
Mixing the right Formula
DSSR posted this at 16:01 — 20th March 2006.
They have: 166 posts
Joined: Mar 2006
There is an extra space here after "Areas"
<a href="#" class="leftnav">Areas we cover</a><br>
But I'm not sure what you are saying, it looks perfect in ie6?
DaveyBoy posted this at 16:03 — 20th March 2006.
They have: 453 posts
Joined: Feb 2003
yeah looks pretty much identical to me in both browsers.
DSSR posted this at 16:09 — 20th March 2006.
They have: 166 posts
Joined: Mar 2006
BACKGROUND-REPEAT: repeat-y;
? is that why?? taking a guess, but if you want to take out teh white line, you have to use repeat-x;?
Or is it "no-repeat"?
demonhale posted this at 16:12 — 20th March 2006.
He has: 3,278 posts
Joined: May 2005
there is really a white line at the bottom of IE, you cant do anything about it...
ajr_designer posted this at 16:23 — 20th March 2006.
He has: 18 posts
Joined: Feb 2006
Hmm… don’t think I explained myself properly, I’ve taken a screen shot and highlighted what I mean:
http://www.ajrdesigner.co.uk/work/na/example1.jpg
I know it’s offsetting the background image to the right or the content to the left but why?
The Definitive solution
Mixing the right Formula
DSSR posted this at 16:29 — 20th March 2006.
They have: 166 posts
Joined: Mar 2006
http://img468.imageshack.us/img468/8079/example4ee.jpg
Mine doenst look like that.
demonhale posted this at 16:30 — 20th March 2006.
He has: 3,278 posts
Joined: May 2005
Ok I see it, but at higher resolutions the problem is not visible, it only shows when I use 800x600 resolution when using ie...
ajr_designer posted this at 16:41 — 20th March 2006.
He has: 18 posts
Joined: Feb 2006
I think it’s only an IE6 issue and the guy use’s a 800x600 screen res – I’ve got an idea on how I could stop it but I don’t know how to implement it:
I reckon that IE6’s idea of centring an image in the body is different to centring a div tag – therefore if I was to attach the image to a div tag it would fix the problem BUT I want the image to continue right down the page instead of cutting off where the div ends and if I set the div height to 100% it doesn’t work.
Is there any way to make a div tag the same height as the screen size even if the content isn’t?
The Definitive solution
Mixing the right Formula
steve40 posted this at 16:46 — 20th March 2006.
He has: 490 posts
Joined: May 2005
I don't see any real problems @ any resolution IE-6.
demonhale posted this at 16:55 — 20th March 2006.
He has: 3,278 posts
Joined: May 2005
one solution is that you should set the width on your #page tag 1 pixel higher meaning like this...
#page {
width: 761px;
And remake that bg image and cut that 1px difference...
these usually happens when the other elements are not set to match or uses position:absolute... you should limit the absolute use to minimize these kinds of problems...
ajr_designer posted this at 16:57 — 20th March 2006.
He has: 18 posts
Joined: Feb 2006
Tried that and it messed it up in FF :/
demonhale posted this at 17:06 — 20th March 2006.
He has: 3,278 posts
Joined: May 2005
try this, add 1 px margin left to #banner , #topnav , #content...
margin-left:1px;
then remake the bg image for this, the problem will not show again...
ajr_designer posted this at 17:43 — 20th March 2006.
He has: 18 posts
Joined: Feb 2006
Right, problem solved!
I set a div to 770px wide 100% height and auto margins and put the background on that, then I put another one inside but 760px wide with all the content in – sorted!
Thanks for all your help people – sometimes you just need some ideas to help you think logically.
The Definitive solution
Mixing the right Formula
demonhale posted this at 18:04 — 20th March 2006.
He has: 3,278 posts
Joined: May 2005
weapping in multiple divs is a solution, but usually I dont suggest that since its another line of css for semantic markup... Anyways its good that its solved...
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.