View Full Version : First Bracket Set in CSS not showing up


CevilgeniuS
04-19-2004, 12:05 AM
Okay, I was playing around with CSS this morning and I hit a problem. In my external stylesheet, the first {} would not be accepted and the styles would not show. I've solved it by putting a {} at the top... but what's going on? It's never happened before.

My stylesheet:
<style type="text/css">

<!--

{}

.other{
font-family: verdana;
font-size: 8pt;
color:#000;
border:1px solid;
border-color:#000;
}

.header{
font-family: verdana;
font-size: 8pt;
color:#fff;
border:1px solid;
border-color:#000;
background-color:#006600;
height:20px
}

-->
</style>

-Norm

salomeyasobko
04-19-2004, 12:12 AM
you didn't finish writing some of the hex color codes- you only put 3 digits/ letters :lol: i changed the code for you so replace it with the one i put, and make sure you edit the bold parts because i'm not sure exactly what color you wanted.

<style type="text/css">

.other{
font-family: verdana;
font-size: 8pt;
color:#000;
border:1px solid;
border-color:#000;
}

.header{
font-family: verdana;
font-size: 8pt;
color:#fff;
border:1px solid;
border-color:#000;
background-color:#006600;
height:20px
}

</style>

lefty
04-19-2004, 01:15 AM
Actually, those hex codes are correct.

If you take out the <style> tags, your external sheet will work.

CevilgeniuS
04-19-2004, 01:18 AM
you didn't finish writing some of the hex color codes- you only put 3 digits/ letters :lol: i changed the code for you so replace it with the one i put, and make sure you edit the bold parts because i'm not sure exactly what color you wanted.

<style type="text/css">

.other{
font-family: verdana;
font-size: 8pt;
color:#000;
border:1px solid;
border-color:#000;
}

.header{
font-family: verdana;
font-size: 8pt;
color:#fff;
border:1px solid;
border-color:#000;
background-color:#006600;
height:20px
}

</style>

I have no clue what you just said.

Actually, those hex codes are correct.

If you take out the <style> tags, your external sheet will work.

Thanks that helped alot.

-Norm

salomeyasobko
04-19-2004, 01:34 AM
thanks for the info lefty. i said that those 3 letter/digit hex codes were incorrect, but i guess they weren't. just haven't seen them used before. :confusion i missed the part about that being an external style sheet :lol: