| | |
CSS mozilla problems
Please support our HTML and CSS advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
hi,
I have a header on my website. Whenever i add a tag in side the header an annoying white space forms above it. This happens only in firefox:
CSS:
I have a header on my website. Whenever i add a tag in side the header an annoying white space forms above it. This happens only in firefox:
CSS:
HTML and CSS Syntax (Toggle Plain Text)
body,html{margin:0; padding:0; width:100%}
HTML:HTML and CSS Syntax (Toggle Plain Text)
#head{ width:100%; height:auto; padding:0; margin:0; background:#09F}
Thanking you in advanceHTML and CSS Syntax (Toggle Plain Text)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="styles/general.css" /> <title>PSPF Intranet system</title> </head> <body> <div id="head"> <div id="menubar"> <ul> <li>Item1</li> <li>Item2</li> <li>Item3</li> <li>Item3</li> </ul> </div> </div>
Last edited by alimoe; Sep 30th, 2009 at 5:35 am.
I am a Novice..............
- Item1
- Item2
- Item3
- Item3
not sure, but, the default style for lists has a whitespace between li elements
css Syntax (Toggle Plain Text)
ul {margin:0; padding:0;} ul li {margin:0; padding:0;}
Last edited by almostbob; Sep 30th, 2009 at 8:46 am.
Failure is not an option It's included free
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
If at first you dont succeed, join the club
Of course its always in the last place you look, you dont keep looking after you find it
Please mark solved problems, solved
Would those tags happen to be in between the
If the whitespace keeps returning with different tags just add the line
Hope that helps, good luck.
Traevel
<ul> tags? In that case they would still create a whitespace above your header. The suggestions almostbob made should help in removing all the margins for ul and li tags, and they certainly remove the whitespace in Firefox with the code you provided. If you're only interested in removing the top margin, you could also use css Syntax (Toggle Plain Text)
ul{margin-top:0;}
If the whitespace keeps returning with different tags just add the line
tag{margin-top:0;} or tag{margin:0;} for the specific tag(s) as well. Hope that helps, good luck.
Traevel
6.5 When the answer cannot be put into words, neither can the question be put into words. The riddle does not exist. If a question can be framed at all, it is also possible to answer it. ~ Ludwig Wittgenstein
![]() |
Similar Threads
- CSS positioning problems (HTML and CSS)
- navigation using css (HTML and CSS)
- Firefox hates my CSS now so does IE (HTML and CSS)
- CSS positioning problems (HTML and CSS)
- xp and css (Windows NT / 2000 / XP)
- What am i doing wrong with CSS in Firefox? (HTML and CSS)
- Internet explorer problems (Web Browsers)
Other Threads in the HTML and CSS Forum
- Previous Thread: Javascript onHover effect ?
- Next Thread: where to put background in this code
| Thread Tools | Search this Thread |
appointments asp background backgroundcolor beta browser bug calendar cart cgi code codeinjection corporateidentity css design development displayimageinsteadofflash dreamweaver emailmarketing epilepsy explorer firefox flash form format google griefers hackers hitcounter hover html ide ie7 ie8 iframe image images internet internetexplorer intranet iphone javascript jpeg layout macbook maps marketshare microsoft mozilla multimedia navigationbars news offshoreoutsourcingcompany opacity opera optimization pnginie6 positioning problem scroll seo shopping studio swf swf. textcolor timecolor titletags url urlseparatedwords visual visualization web webdevelopment webform website windows7






