Me Again! (CSS)
Hi Guys,
In Firefox i'm getting a horizontal scrollbar for some reason... In IE it isn't there, but now all middle content is left aligned... any ideas?!
http://www.sixthsense-esp.co.uk/espnews/css-index.htm
http://www.sixthsense-esp.co.uk/espnews/styles/css.css
Thanks
Rob
DarkLight posted this at 20:26 — 24th January 2008.
He has: 287 posts
Joined: Oct 2007
Hi, it's just a thought, but you could try this:...
#body{
text-align:left;
}
If not, then take that "#" off the "body" line on the top.
Note that this will only align everything to the left, it will NOT make everything fit nice and snug onto your page. It should fix any alignment confusions.
If, in your case, you want everything in the middle, use this:
#body{
text-align:center;
}
Hope this helps
All the best news here: https://newsbotnet.com
webwiz posted this at 23:00 — 24th January 2008.
He has: 629 posts
Joined: May 2007
The horizontal scroll bar seems to be caused by the tight layout inside your #topbanner. Eliminating the unnecessary margin-left declaration for #mainmenu seems to fix it my end.
The reason for the left alignment in IE is due to the lack of a DOCTYPE[1] at the start of your HTML. This makes IE (all versions) act like last century's IE 5.0 browser, ignoring a lot of CSS, including the "margin: 0 auto;" declaration that works on all modern browsers to center content.
I also note that you have duplicated a lot of IDs. An ID should be unique within a document. Imagine the U.S. with lots of duplicate Social Security numbers to envision the chaos.
[1] http://www.alistapart.com/stories/doctype/
Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;
robfenn posted this at 19:08 — 31st January 2008.
He has: 471 posts
Joined: Jun 2005
Thanks guys, you're great!
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.