473,387 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to center a div in IE 5.5 ?

Here's a page that is centered in all browsers minus in IE 5.5:
http://www.fala-brasil.com/test/

I used:

#main {
margin: 0 auto;
width: 760px;
}

to center the main page. It doesn't seem to work in IE 5.5. Is there a
solution?
Thanks,

--
Boost the visibility of your web site in Google!
http://www.digitalpoint.com/tools/ad-network/?s=5203

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

http://www.auriance.com - http://www.auriance.net
Jul 21 '05 #1
5 11368
Unknown User wrote:
Here's a page that is centered in all browsers minus in IE 5.5:
http://www.fala-brasil.com/test/

I used:

#main {
margin: 0 auto;
width: 760px;
}

to center the main page. It doesn't seem to work in IE 5.5. Is there a
solution?
Thanks,


dont think i can answer your question, instead i have a question:
you use the xhtml doctype, can/do you realy expect pre-IE6 browsers to
nicely render an xhtml page ?

my guess is that you could center your stuff using some legacy html.

gl
martin
Jul 21 '05 #2
"Unknown User" <me@privacy.net> wrote:
Here's a page that is centered in all browsers minus in IE 5.5:
http://www.fala-brasil.com/test/

I used:

#main {
margin: 0 auto;
width: 760px;
}

to center the main page. It doesn't seem to work in IE 5.5. Is there a
solution?


Win IE5.x doesn't understand margin: auto. But you can use another bug
to get the same result. Win IE5 incorrectly applies text-align to
block level children.

Thus
body {text-align: center;}
#main {margin: 0 auto; width: 760px; text-align: left;}

will center the element in IE5.x and decent browsers. The text-align:
left in the #main styles is to prevent the content of the element
being centered.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #3
"Martin!" <ma**********@home.nl.knip.knip.knip> wrote:
Unknown User wrote:
Here's a page that is centered in all browsers minus in IE 5.5:
http://www.fala-brasil.com/test/

dont think i can answer your question, instead i have a question:
you use the xhtml doctype, can/do you realy expect pre-IE6 browsers to
nicely render an xhtml page ?


Why not? IE5 has exactly the same support for XHTML as IE6 - none at
all.

The page may have an XHTML doctype on it but it's being served as
text/html (the meta tag that claims otherwise is of course ignored in
favour of the actual HTTP header), and has been written in accordance
with Appendix C of the XHTML 1.0 spec so browsers will treat it as
sort-of-HTML. That's the only way to make IE render any XHTML page.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 21 '05 #4
On Wed, 09 Mar 2005 20:12:34 -0300 Unknown User wrote:
Here's a page that is centered in all browsers minus in IE 5.5:
http://www.fala-brasil.com/test/

I used:

#main {
margin: 0 auto;
width: 760px;
}

to center the main page. It doesn't seem to work in IE 5.5. Is there a
solution?
Thanks,


Another solution might be to use 3 divisions housed in a container.
Make the container the width of the window.
Set your left and right divisions widths to a percentage.
That way it would appear as a centered division.


Jul 21 '05 #5
Is there some way I could do a vertical and horizontal center in page(as
it is for many 'soon online' sites) in all browsers? It was easy with
tables but not that easy with divs!

Thanks

/Gnolen

Unknown User wrote:
Here's a page that is centered in all browsers minus in IE 5.5:
http://www.fala-brasil.com/test/

I used:

#main {
margin: 0 auto;
width: 760px;
}

to center the main page. It doesn't seem to work in IE 5.5. Is there a
solution?
Thanks,

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alex | last post by:
Hi Everone, I need some advice on how to setup 4 columns where the outside two are absolute (120px) and the inner two (side by side) are relevent (Fluid) and change with the screen. Here's my...
3
by: Mike | last post by:
Another complaint I would like to see corrected. The Information Center tool is now pretty much useless to me. Does anyone else besides me remember when information center had a troubleshooting tab...
2
by: Claude Shea | last post by:
Is DB2 Development Center an addon product that I have to download or purchase separately? I can't seem to find it in any of my downloads or on any of my CDs. Is it available for all versions of...
1
by: Henry Reardon | last post by:
I have been having problems with the Development Center for several days now. It seemed to be working fine when I initially installed DB2 (LUW) Version 8 (FP7) and upgraded to FP8, except that I...
4
by: Joey | last post by:
Does anyone know how to center this sample webpage in Firefox? If so, will you provide the example as it applies to this sample webpage? I have read numerous posts and articles on how to center...
1
by: judacris | last post by:
I've seen the threads here about molding 2 divs in a centered fashion. but I can't seem to solve this thing. my blogger blog is functioning well on my site for now, but the blog feed (left) and...
24
by: GloStix | last post by:
I'm trying to center this banner, it's in a div that has the same width so it's not exactly "centering" but it's screwed up, It works in safari but in Firefox it's messed up. I uploaded a Video to...
2
by: yangtono | last post by:
Hi, I am creating a table to list some data. The table is using a sorting and highlight function that I found from the net. I can't attach image here, basically html will wrap the heading,...
14
by: gaijinco | last post by:
I was a hobbist web coder for years but I had to sidestep for a while. Now I'm trying to return to it and I'm trying to clarify how am I supposed to do somethings with CSS v.s. HTML and I'm...
13
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.