Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

clum

Why is Internet Explorer so bad?

This topic is 5357 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I knew that title would get someone''s attention. I''m trying to write a website for a program of mine, and I''m having trouble doing the simplest thing in the world. In Mozilla, my website looks fine. In IE, it looks almost identical. Except for one thing - the logo isn''t centered! Can anyone tell what''s wrong with my CSS (or what IE bug I have exploited and how to work around it)? I did short search and there doesn''t seem to be any known problems with horizontal centering in IE6. Any help is much appreciated. PS: If you think my CSS code is a bit weird, you''re right. I originally had just a #logo id, which had everything it currently has, plus the centering. But I hoped (incorrectly) that IE was confused by my combination of positioning and centering, so I created another inner <div> tag. The official zorx website

Share this post


Link to post
Share on other sites
Advertisement
I don't really see anything, including the part where you center it :D. Although I didn't take a look at the external css file. Btw, don't use /'s in serious descriptions/logs/stuff (), it looks really unprofessional and bothers me a lot.


[edited by - brassfish89 on February 19, 2004 6:55:21 PM]

Share this post


Link to post
Share on other sites
Here''s all the relavent parts. The linked style sheet is a direct link to one of w3''s "core" style sheets.
   
...
<link rel="stylesheet" href="http://www.w3.org/StyleSheets/Core/Ultramarine" type="text/css">

<!-- This is how the web page differs from the standard "Ultramarine" stylesheet -->
<style type="text/css"> <!--
...
.center {text-align: center}
...
#logo {position: absolute; left: 0; top: 0; right: 0em; height: 100px}
-->
</style>
...
<div id="logo">
<div class="center">
<img alt="Discontinuity logo" src="../logo.gif">
</div>
</div>


The official zorx website

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You''re approaching this incorrectly. CSS doesn''t have a notion of centering boxes, just of text!

To position a box you need margins, specifically the left and right margins should be set to auto on your image so they''ll equally distribute. i.e.

img {display: block; margin: 0 auto;}

actually I just found this link!

http://www.w3.org/Style/Examples/007/center.html
how handy :-). Furthermore, the incongruency between IE6 and Mozilla is probably due to the DOCTYPE you''re using. It''s not capitalized and I''m not sure it''s correct, but it needs to be otherwise the browsers switch to a compatibility mode in which they sorta guess what you want (not handy for a new page at all).

just search for DOCTYPE switch on google.

Share this post


Link to post
Share on other sites
Yeah, yeah, yeah. I''ve had plenty of websites not working Mozilla (I remember one particular one where everything was all over the place). I just want to get my website working the way I want it.

The official zorx website

Share this post


Link to post
Share on other sites
Actually, I copied my DOCTYPE from w3''s website and it validated fine (actually, it had one error - something about the border attribute not existing - that''s the sourceforge logo''s fault).

The official zorx website

Share this post


Link to post
Share on other sites
I think it''s the way the boxes are rendered between browsers, most likely the width of the box. Give this a shot and tell me what happens:
.center { text-align: center; width: 100%; } 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!