Forum Moderators: not2easy
#main_content {
/* make absolutely positioned children calculate their co-ordinates from this */
position: relative;
/* centre the site */
width: 775px;
margin: 0 auto;
}
It works fine in mozilla firefox but ie is not doing the job.
I am hoping someone knows of a workaround? I assume that i will probably have to add:-
<!--[if gte IE 5]>
<link rel="stylesheet" media="screen, projection" type="text/css" href="./stylesheets/ie5.css" />
<![endif]-->
into my html document and create a new ie5.css with a few minor changes to the #main_content code?
Why won't this code center my main content in IE?
I would suggest using...
[blue]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">[/blue]
[blue]<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">[/blue]
birdbrain
It may answer your question to some degree.
...but in both browsers I have some gaps that have just appeared between pictures.
At the bottom I guess? This is likely because you are now in 'standards mode' (with a correct DOCTYPE) and not 'quirks mode' (without a DOCTYPE). In standards mode, images (inline elements), rigidly sit on the (text) baseline and consequently you can get a gap beneath the images where the descenders (tails of the 'g', 'p' etc...) would go.
It can be easily resolved however...
[webmasterworld.com...]
...but in both browsers I have some gaps that have just appeared between pictures.
[devedge-temp.mozilla.org ]
birdbrain
At the bottom I guess?well no not really
[edited by: Robin_reala at 8:33 pm (utc) on Mar. 11, 2007]
[edit reason] Removing URL as per TOS #13 [webmasterworld.com] [/edit]