CSS mozilla problems

Thread Solved

Join Date: Jun 2008
Posts: 50
Reputation: alimoe is an unknown quantity at this point 
Solved Threads: 2
alimoe's Avatar
alimoe alimoe is offline Offline
Junior Poster in Training

CSS mozilla problems

 
-1
  #1
Sep 30th, 2009
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:
HTML and CSS Syntax (Toggle Plain Text)
  1. body,html{margin:0;
  2. padding:0;
  3. width:100%}
HTML and CSS Syntax (Toggle Plain Text)
  1. #head{ width:100%;
  2. height:auto;
  3. padding:0;
  4. margin:0;
  5. background:#09F}
HTML:
HTML and CSS Syntax (Toggle Plain Text)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <link type="text/css" rel="stylesheet" href="styles/general.css" />
  6. <title>PSPF Intranet system</title>
  7. </head>
  8.  
  9. <body>
  10. <div id="head">
  11. <div id="menubar">
  12. <ul>
  13. <li>Item1</li>
  14. <li>Item2</li>
  15. <li>Item3</li>
  16. <li>Item3</li>
  17. </ul>
  18. </div>
  19. </div>
Thanking you in advance
Last edited by alimoe; Sep 30th, 2009 at 5:35 am.
I am a Novice..............
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 1,325
Reputation: almostbob has a spectacular aura about almostbob has a spectacular aura about 
Solved Threads: 161
almostbob's Avatar
almostbob almostbob is online now Online
Nearly a Posting Virtuoso

Re: CSS mozilla problems

 
0
  #2
Sep 30th, 2009
  • Item1
  • Item2
  • Item3
  • Item3
try styling unordered lists
not sure, but, the default style for lists has a whitespace between li elements
  1. ul {margin:0; padding:0;}
  2. 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
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 50
Reputation: alimoe is an unknown quantity at this point 
Solved Threads: 2
alimoe's Avatar
alimoe alimoe is offline Offline
Junior Poster in Training

Re: CSS mozilla problems

 
0
  #3
Oct 1st, 2009
its not just the list tag, its any tag i add.
I am a Novice..............
Reply With Quote Quick reply to this message  
Join Date: May 2009
Posts: 24
Reputation: Traevel is an unknown quantity at this point 
Solved Threads: 9
Traevel's Avatar
Traevel Traevel is offline Offline
Newbie Poster

Re: CSS mozilla problems

 
0
  #4
Oct 1st, 2009
Would those tags happen to be in between the <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

  1. 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
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 50
Reputation: alimoe is an unknown quantity at this point 
Solved Threads: 2
alimoe's Avatar
alimoe alimoe is offline Offline
Junior Poster in Training

Re: CSS mozilla problems

 
0
  #5
Oct 2nd, 2009
still... it works fine with IE but not with firefox
I am a Novice..............
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 50
Reputation: alimoe is an unknown quantity at this point 
Solved Threads: 2
alimoe's Avatar
alimoe alimoe is offline Offline
Junior Poster in Training

Re: CSS mozilla problems

 
0
  #6
Oct 2nd, 2009
solved: I just float some divs... it works great.


Thank you all.
I am a Novice..............
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 1
Reputation: cleanserevoluti is an unknown quantity at this point 
Solved Threads: 0
cleanserevoluti cleanserevoluti is offline Offline
Newbie Poster

Re: CSS mozilla problems

 
0
  #7
Oct 2nd, 2009
try to add specifically
margin-top: 0px; in the body css
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC