position: relative; width: 655px; border-top: 2px solid #000; border-bottom: 2px solid #000; margin: 10px auto; color: blue; background: #eee; font-weight: bold;
This make thebox centered in firefox but not ie.
whats the best way to center it in ie?
Thanks
http://csscreator.com/node/19
There is insufficient data
There is insufficient data for a meaningful answer.
Ed Seedhouse wrote:There is
There is insufficient data for a meaningful answer.
Yep, but I got my money on an xml prolog.

How the deuce do your deduce
How the deuce do your deduce that, Sherlock?
[code] #box { position:
[code]
#box {
position: relative;
width: 655px;
border-top: 2px solid #000;
border-bottom: 2px solid #000;
margin: 10px auto;
color: blue;
background: #eee;
font-weight: bold;
}
[\code]
This code, makes a box.
Margin: 10px auto centers the box in firefox directly center of the browser window.
However this same code makes the box in internet explorer go all the way to the left of the browser window.
I would like it to be centered inside of internet explorer and firefox.
No other code has been made on this page. If you use this exact code and you will find a box.
this is the entire txt file with the code in it!
pinehead wrote: #box
#box {
position: relative;
width: 655px;
border-top: 2px solid #000;
border-bottom: 2px solid #000;
margin: 10px auto;
color: blue;
background: #eee;
font-weight: bold;}
This code, makes a box.
No it doesn't, not unless it applies to some block element in your html, and your html is valid. By itself it does nothing at all.
There is still insufficient data for a meaningful response.
I suggest you go to the forum index, read the very first message which we ask everyone to read before posting, return here and comply with it's requests. Then, when you give us what we need to help you, we may actually be able to help.
Pinehead you must get used
Pinehead you must get used to showing all your code as this does seem to be a continual problem.
Look at this code below it creates your 'boxes' and they are centred :shrug:
So please tell us what you have done differently?
/**/
Now this 'box' does appear as it has some content! if you see the 'box above then you are viewing in IE, FF and others will collapse the 'box' leaving only the borders, they won't show something that hasn't got 'Content' - that which gives an element a purpose and therefore a reason to display. Oh and they are both centered *shrug* Please tell us that you have got a DTD on the page and that you haven't got data before that DTD such as a XML declaration?
Ed Seedhouse wrote:How the
How the deuce do your deduce that, Sherlock?
It's just a gamble. You in for a fiver?


Take your code. View it in
Take your code.
View it in ie.
Tell me how to get the box
To be in the center of ie not to the left.
pinehead wrote:Take your
Take your code.
View it in ie.
Tell me how to get the box
To be in the center of ie not to the left.
"Oh you mean I have to copy
"Oh you mean I have to copy all that gobbley-guck at the top of the html?"
pinehead wrote:Take your
Take your code.
View it in ie.
Tell me how to get the box
To be in the center of ie not to the left.
Pinehead please explain this response and to whom you are addressing it and what exactly the problem is that you are having; this is not a suitable comment given the code I showed you, please address posts properly with a suitable response and answer the questions raised otherwise I will have to assume that this is simply a time waste and I'll disable further comments.
Show us what code YOU HAVE that is not working the way you wish it to
It's definitely either an
It's definitely either an incomplete DTD, an XML prolog, or he's using IE5 whch needs text-align: center; on the body.
I'm having a similar problem
I'm having a similar problem here: http://216.106.58.214/
City of Columbia Office of Cultural Affairs Artists' Registry
The "main" div is centered horizontally in Firefox, but not IE. What do I need to change to get the "main" div centered in IE?
Please read the stickies at
Please read the stickies at the top of each forum, in particular the ones about using a Doctype declaration (DTD). If you follow those instructions, the issue will be resolved.
cheers,
gary