Credit Cards - Personal Loans - Magnetic Bead Bracelet - Free Animated Greetings - Travel news

PDA

View Full Version : CSS AND Firefox (a different problem)


david_sakh
Oct 7th 2004, 11:38 am
I'm using an internal style sheet for my site, and only a few of the parameters register on firefox, including parameters for anchor text, font colors, scrollbar colors, etc.

What's going on?

My protype index page, which looks like crap in Firefox (http://www.exclusivefreegames.com/)

Percept
Oct 7th 2004, 11:43 am
.menubg {bgcolor:"black";background-image: url("http://www.exclusivefreegames.com/images/tiledmenu.jpg");}
a {text-decoration:"none";color:"yellow"}
font {color:"white";face:"Veranda"; size:"3"}
td {color:"white";valign:"top";align:"left"}
body
{
bgcolor:"000000";
background-image: url("http://www.exclusivefreegames.com/images/slash.jpg");
scrollbar-face-color: 555555;
scrollbar-highlight-color: CCCCCC;
scrollbar-3dlight-color: 333333;
scrollbar-darkshadow-color: 222222;
scrollbar-shadow-color: 333333;
scrollbar-arrow-color: 000000;
scrollbar-track-color: 888888;
}


should be


.menubg {
bgcolor: black;
background-image: url("http://www.exclusivefreegames.com/images/tiledmenu.jpg");
}

a {
text-decoration: none;
color: yellow
}

font {
color: white;
face: Veranda;
size: 3
}

td {
color: white;
valign: top;
align: left
}

body {
bgcolor: #000000;
background-image: url("http://www.exclusivefreegames.com/images/slash.jpg");
scrollbar-face-color: #555555;
scrollbar-highlight-color: #CCCCCC;
scrollbar-3dlight-color: #333333;
scrollbar-darkshadow-color: #222222;
scrollbar-shadow-color: #333333;
scrollbar-arrow-color: #000000;
scrollbar-track-color: #888888;
}

david_sakh
Oct 7th 2004, 11:46 am
thanks! But what was I doing wrong? The codes look almost identical....

Percept
Oct 7th 2004, 11:47 am
You forgot to add # in front of colorcodes and you shouldn't put quotes arround values in CSS (except for the background image location or fontnames with multiple words like "Trebuchet MS") . ;)

david_sakh
Oct 7th 2004, 11:50 am
thanks. I guess there's a lot I need to learn. :)

TwisterMc
Oct 7th 2004, 3:06 pm
you need the 'web developer' extension for firefox and use the 'validate css' option. It comes in handy a lot for me. :D

DarrenC
Oct 18th 2004, 5:07 pm
I have the same problem.. I really want to use firefox (has some cool features) but I cannot view my own site on firefox so I've stuck with IE6.0

All that happens is the CSS navigation menu's at the left hand side and top are not working properly, and I'm assuming its something I've done wrong in the css file.

I'd appreciate anyones help on this one!

Cheers,
Darren :)

J.D.
Jan 3rd 2005, 2:00 pm
.menubg {
bgcolor: black;
background-image: url("http://www.exclusivefreegames.com/images/tiledmenu.jpg");
}

There's no bgcolor property in CSS. It is better to use relative URLs instead of absolute ones - it makes the stylesheet portable (e.g. if you ever change your domain name or just want to reuse the stylesheet):

.menubg {
background-color: black;
background-image: url("/images/tiledmenu.jpg");
}

font {
color: white;
face: Veranda;
size: 3
}

It is strongly recommended by W3C to provide alternative fonts. Remember some visitors don't have fonts you have on your machine. There's no properties font or size. Here's how this selector should look instead:

font {
color: white;
font-family: Veranda, sans-serif;
font-size: medium;
}

It is also illegal to quote keywords, such as "red". For example, this is *not* a valid CSS selector:

p {color: "red";}

In this example "red" is a string, not a keyword. This selector should look like this:

p {color: red;}

You can use W3C CSS validator:

http://jigsaw.w3.org/css-validator/

J.D.