Click to See Complete Forum and Search --> : CSS doesn't view in Firefox
armadillo1111
09-20-2005, 04:46 AM
Hi,
My site, www.joewalkden.co.uk, has problems in Firefox - the CSS doesn't seem to be recognized. Any thoughts?
NogDog
09-20-2005, 05:06 AM
While it seemed to display OK for me in FF and IE, running it through http://validator.w3.org/ turned up some errors in the HEAD section which seem to be remedied if you put quotes around attributes with non-word characters in them, like:
<LINK href="home.css" type="text/css" rel="stylesheet">
...instead of...
<LINK href="home.css" type=text/css rel=stylesheet>
It's a good habit to just quote all attribute values so as to avoid any such problems.
armadillo1111
09-20-2005, 06:02 AM
Thanks,
I've made those changes and it works fine for me now. However, any idea why the navigation bars on the left aren't viewing quite right - they seems to be no gap between two of the rollovers (in Firefox)?
Change or remove the line-height in #navcontainer ul
Change the padding to adjust the height of the element
armadillo1111
09-20-2005, 09:48 AM
<quote>
Change or remove the line-height in #navcontainer ul
Change the padding to adjust the height of the element</quote>
I can't really see where I have line height in this div and when I change the padding it goes a little weird. Any idea exactly what changes I have to make to the CSS?
thanks
#navcontainer ul
{
margin: 0;
padding-left: 0;
list-style-type: none;
font: 10pt georgia;
}
#navcontainer a
{
display: block;
padding:8px 3px;
width: 160px;
background-color: #509BC3;
border-bottom: 1px solid #eee;
}
armadillo1111
09-20-2005, 11:07 AM
Excellent
where I had the font as 10/20pt Georgia in the #navcontainer ul, what did that do exactly? I think I'd copied it from somewhere else (always a mistake!)
thanks
font : 9pt/18pt georgia;
font: [font-size (http://www.w3.org/QA/Tips/font-size) ]/[line-height] [font-family];
font-family: You are encouraged to offer a generic family as a last alternative
i.e. georgia, serif;
felgall
09-20-2005, 03:46 PM
Setting the line height separately from the font size allows you to specify a bigger or smaller amount of space above/below the letters in your text.
armadillo1111
09-21-2005, 03:21 AM
thanks guys. This forum is so useful.