Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Something amiss when my page is viewed with Firefox 1

Status
Not open for further replies.
Jan 14, 2003
194
US
I used to just code for IE since that was the majority, until I started using Firefox and realized how bad some pages looked. Now I use both when I write to work out the anomalies.

Anyway, the website I created for my fiance and I has a drop-down menu at the top spun horizontally using CSS and a ul. It positions itself just fine on IE, but on Firefox there's a left margin of about 35-40 pixels that I can't seem to get rid of.

I'm still a beginner with CSS so there's a very good chance that it's buried somewhere in my code.

Any help is greatly appreciated!
 
IE is the worst browser to test in

use a full doctype. see thread215-906416

that way you are coding to standards NOT IE in quirks mode.



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
I've realized how bad it is, but since it's still the majority it's quirks have to be considered and worked (or hacked) around.

Anyway, I believe I AM using a full doctype on all of my pages:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"
<html xmlns=".........

Is this not correct?
 
This looks like standard problem with UL tag. Use padding-left: 0px; in "nav" ID selector.
 
Hey hey!! That did it!

Out of curiosity, what's the standard problem with UL tags? I'll be using more of them for future menus on other sites.

Thanks!!
 
When not specified, IE adds default margin-left to UL and Mozilla does the same with padding-left:
Code:
<ul style="border: solid red 1px;">Nope
	<li>One</li><li>Two</li><li>Three</li><li>Four</li>
</ul>

<ul style="border: solid red 1px; padding-left: 0px;">padding
	<li>One</li><li>Two</li><li>Three</li><li>Four</li>
</ul>	

<ul style="border: solid red 1px; margin-left: 0px;">margin
	<li>One</li><li>Two</li><li>Three</li><li>Four</li>
</ul>	

<ul style="border: solid red 1px; margin-left: 0px; padding-left: 0px;">padding, margin
	<li>One</li><li>Two</li><li>Three</li><li>Four</li>
</ul>
The safest bet is to define both. You already had UL { margin: 0px } so...
 
Good to know!

I have another dumb question, kind of on the same topic...sort of.

I just pulled up my page in IE 5.5 and everything is shoved over to the left side of the page. What's up there?

Coding for so many different browser versions is a pain!!
 
Wrap everything inside body into div id="wrapper" then change CSS file:
Code:
BODY {
...
margin: 0px auto;
[b]text-align: center;[/b]
...
[b] /* remove WIDTH: 800px; */ [/b]
...
}
[b]
#wrapper
{	text-align: left;
	WIDTH: 800px; 
}[/b]
Maybe you should also use clearing DIV at the end, I don't know.
Coding for so many different browser versions is a pain!!
This depends on technology used. DIV-based layouts can be pain, mostly thanks to bugs and non-standard implementations in IE browsers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top