Help - Search - Members - Calendar
Full Version: a CSS file...having problems
Forums > Resource Center > Webmasters' Corner > Webmasters' Corner Resolved Topics
crazy_goat_blackie
i'm kind of new to CSS...so...yeah. and i'm having issues with my new template i'm making for the CSS reboot. the thing is, it looks absolutely perfect in internet explorer, but when i view it in firefox everything is screwed up! which obviously means there's something wrong with my code. anyone know what? i put it through the w3 validator but the report it gave me made no sense...

here it is:

CODE
<style type="text/css">

body
 {
 background:black;
 scrollbar-arrow-color:black;
 scrollbar-track-color:black;
 scrollbar-shadow-color:gray;
 scrollbar-face-color:orange;
 scrollbar-darkshadow-color:darkgray;
 scrollbar-highlight-color:lightgray;
 scrollbar-3dlight-color:orange;
font:12px Tw Cen MT white;
 }

a:link
 {
 font-color:blue;
 font:12px Tw Cen MT blue;
 font-size:12px;
 text-decoration:none;
 }

a:visited
{
font-color:blue;
font:12px Tw Cen MT blue;
font-size:12px;
text-decoration:none;
}

a:hover
{
font-color:mediumblue;
font:14px Tw Cen MT mediumblue;
font-size:15px;
text-decoration:italic;
cursor:crosshair;
background-color:black;
border:1px dashed orange;
}

#title
{
align:center;
height:50px;
width:550px;
font-color:white;
font:12px Tw Cen MT orange;
font-size:12px;
text-decoration:none;
background-color:#333333;
border:2px dashed orange;
}

#navigate
{
height:50px;
width:550px;
background-color:#000000;
}

#entry
{
align:center;
height:350px;
width:550px;
background-color:#222222;
border:2px dashed orange;
text-decoration:none;
}

#footer
{
align:center;
height:100px
width:550px;
background-color:#000000;
}
</style>


<!-- DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>.:. Crazy Goat Design .:.</title>
</head>

<center>
<div id="title">
<center>
<font face="script mt bold" size="+3" color="orange">
<p>Crazy Goat Design</p>
</font>
<font face="trebuchet MS" size="+0" color="orange">
<p>"Let's all be goats in a field with no fences to keep us out of the Orchard."</p>
</font>
<p> </p>
</center>
</div>
</center>

<center>
<div id="navigate">
<center>
<font face="Trebuchet MS" color="white" size="-1">
<marquee>Brand new look + <a href="http://cssreboot.com" title="CSS Reboot">CSS Reboot</a> + Join the Reboot</marquee>
</font>
<font face="Trebuchet MS" color="white" size="+0">
+ <a href="http://www.diary-x.com" title="hostie">Diary X</a>
+ <a href="http://www.cafepress.com/uberfwuffwy" title="Uber Fwuffwy Store">Store</a>
+ <a href="http://s7.invisionfree.com/xblog" title="xBlog">xBlog</a>
+ <a href="http://www.xanga.com/crazzy_goat_layzz" title="Crazy Goat Xanga">Xanga</a>
+ <a href="mailto:crazygoat@diary-x.com" title="Email Us">Email</a>
+ <a href="http://www.createblog.com" title="Create Blog">Thanks</a>
+
</br>
</font>
</div>
</center>

<center>
<div id="entry">
<center>
<font face="trebuchet ms" size="+1" color="orange">
<p> </p>
<p>[Title]</p>
</font>
<font face="trebuchet ms" size="+0" color="orange">
<p>[date]</p>
</font>
<p>
<font face="Trebuchet MS" color="white" size="-1">
[body]
</font>
</p>
</center>
</div>
</center>

<center>
<div id="footer">
<center>
<font face="Trebuchet MS" color="white" size="-1">
<p>+ <a href="[prev url]" title="previous entry">Back</a> + Blackie typed at [time] + <a href="[next url]" title="next entry">Forth</a> +</p>
<p>© Crazy Goat Design 2005</p>
</font>
</center>

</html>


Help?
Mulder
well, your stylesheet goes between your <head> tags for one thing..

for the background color, use the background-color tag. and then use the html code for black : #000000.

actually, for all your colors, specify with an actual html code.

for this :
CODE
a:link
{
font-color:blue;
font:12px Tw Cen MT blue;
font-size:12px;
text-decoration:none;
}

you already have the color specified, which actually needs to be the html color. so it should be

font-family: Tw Cen MT. which im not sure is a font available online....



im probably so wrong..



heres your main problem:

you're specifying the colors and font sizes twice. you're listing the colors by their name and not by their html code.

easy to fix. IE might read names by color but i dont know about firefox.
crazy_goat_blackie
i was slacking in the color area, but firefox has always picked up color names before :-\
Mulder
i dont think thats the problem. i pointed out the other ones.
pbferrigan
Hi,
Can you post a link for the site you are using this on? What specific problems are you having?

Thank you,
Peter
jordanriane
If you want to know exact problems, you need to visit http://jigsaw.w3.org/css-validator/.
crazy_goat_blackie
like i said, i went to the validator but to be honest i didn't understand the results it gave me. i'm trying to use it here but it just shows up as a blank page x.x the thing is, on IE it looks all good and fine but the problem in firefox is the text is all screwed up and down lower than it's supposed to be, at least when i view it off my harddrive. when i try and look at it online, it's just...blank.
(btw, it's supposed to be a diary-x template)

Please do not double post, thank you. --Szeh
mipadi
QUOTE(crazy_goat_blackie @ Oct 18 2005, 12:51 PM)
like i said, i went to the validator but to be honest i didn't understand the results it gave me. i'm trying to use it here  but it just shows up as a blank page x.x  the thing is, on IE it looks all good and fine but the problem in firefox is the text is all screwed up and down lower than it's supposed to be, at least when i view it off my harddrive. when i try and look at it online, it's just...blank.
*

You commented out all your code. Doctype declarations start with <!DOCTYPE, not with <!-- DOCTYPE.
crazy_goat_blackie
/me feels incredibly stupid now

oops. i also took out a few extra <br> tags and now everything's all good and fine. i fixed the font and text, too. the only problem is in firefox not all my links are the color i told them to be wacko.gif

okay, i take that back, i'm still ahving a few issues. what seems to be the problem is the text i have set in certain div's (?) aren't...staying there. lookit: http://crazygoat.diary-x.com/journal.cgi?t...inz&entry=lorem in IE it works fine, but in firefox the entry box doesn't expand to hold all the text. how do i fix this? and...am i making sense?

posts merged
talcumpowder
Like Szeh said, don't double post.
And the only time I've seen that happen is when the div has overflow-y: auto; in it.... You can use 100%px for the height measurement and it works though... -isn't sure if that's valid-
mipadi
Instead of specifying a width for your entry text, why not just put a margin at the bottom? Then the DIV will scale vertically to accomodate all text, yet still have some space at the bottom.
jordanriane
QUOTE(crazy_goat_blackie @ Oct 18 2005, 12:51 PM)
like i said, i went to the validator but to be honest i didn't understand the results it gave me. i'm trying to use it here  but it just shows up as a blank page x.x  the thing is, on IE it looks all good and fine but the problem in firefox is the text is all screwed up and down lower than it's supposed to be, at least when i view it off my harddrive. when i try and look at it online, it's just...blank.
(btw, it's supposed to be a diary-x template)

Please do not double post, thank you. --Szeh
*



Did you validate your CSS?

Because the link I gave would've given out straight forward answers to help you fix the CSS.

What you'd do is have everything in a stylesheet, then link the stylesheet in the validator, and etc etc.

I didn't give you the link to validate that your document was infact valid xhtml.
crazy_goat_blackie
QUOTE
Instead of specifying a width for your entry text, why not just put a margin at the bottom? Then the DIV will scale vertically to accomodate all text, yet still have some space at the bottom.


err...what? that completely went over my heard.
mipadi
Don't specify a height for the main content DIV. It will automatically resize to whatever size it needs to be to fit all the content.
crazy_goat_blackie
ah...okay...thankyou so much! finally, someone answers me biggrin.gif
Kenado
Topic Closed.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.