PDA

View Full Version : Fixing the last few bugs on my site - xhtml strict/css



JRPereira
May 27th, 2005, 06:43 AM
With the new version of my site I've gone ahead and redone everything to validate as xhtml strict (except the news page, I need to fix some open br's and such there) and the site makes use of css for most of the positioning and stuff, but there's a couple of problems on the site that I haven't figured out how to fix yet (when viewed in mozilla).

http://pjrp.unleashed.ws (http://pjrp.unleashed.ws/)

1) There's a thick white line under the banner that shouldn't be there - all you should see is the thin white border around the blue nav bar.

2) The site isn't centering like it should.

In internet explorer, the site centers properly, and I can toss a <br /> after the banner (I've currently removed the br as I don't think it's the proper way to do it) to make the white line go away, but I don't know if that's because I'm not coding it the right way, or internet explorer actually handles some css better than mozilla (I'm guessing i'm just not coding it right).

Also, can anybody provide a screenshot of how the site is rendered in safari? I've been interested ever since I heard that safari passes the acid2 test.

ditt0
May 27th, 2005, 08:43 AM
For centering:
text-align: center; doesn't work in Firefox/mozilla etc. Instead, given the fact that .mainbody div already has a set width, add "margin:auto;" to it's properties.

As for the white-line, i'm guessing it's IE white-space bug.So make sure that there is no space in the html between the banner div and the navigation thing.
Something like this:


<div class="mainbody" >< img src="http://pjrp.unleashed.ws/pjrp3_header1.jpg" width="760" height="100" alt="Project JRP" / >< div class="title01">Navigation - < a href="javascript:showhide('navbar');" >[Toggle Visibility]</a>< /div>

JRPereira
May 27th, 2005, 10:12 AM
Okay, I removed the whitespace and it's fixed in IE.

For the whitespace bug, what about mozilla?

Also, setting the margins on mainbody got things centered, thanks.

JRPereira
May 27th, 2005, 10:26 AM
Here's what it looks like so far in both ie and firefox.

http://pjrp.unleashed.ws/ieandfirefox.jpg

ditt0
May 27th, 2005, 10:48 AM
I included the banner image in a div, it's fixed now. I still have to figure out when i get home what was wrong...

JRPereira
May 27th, 2005, 11:21 AM
Great! That fixed it.