1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

CSS AND Firefox (a different problem)

Discussion in 'CSS' started by david_sakh, Oct 7, 2004.

  1. #1
    david_sakh, Oct 7, 2004 IP
  2. Percept

    Percept Peon

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    
    .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;
    }
    
    Code (markup):
    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;
    }
    
    Code (markup):
     
    Percept, Oct 7, 2004 IP
  3. david_sakh

    david_sakh Peon

    Messages:
    1,225
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks! But what was I doing wrong? The codes look almost identical....
     
    david_sakh, Oct 7, 2004 IP
  4. Percept

    Percept Peon

    Messages:
    143
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    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") . ;)
     
    Percept, Oct 7, 2004 IP
  5. david_sakh

    david_sakh Peon

    Messages:
    1,225
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #5
    thanks. I guess there's a lot I need to learn. :)
     
    david_sakh, Oct 7, 2004 IP
  6. TwisterMc

    TwisterMc Mac Guru

    Messages:
    972
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you need the 'web developer' extension for firefox and use the 'validate css' option. It comes in handy a lot for me. :D
     
    TwisterMc, Oct 7, 2004 IP
  7. DarrenC

    DarrenC Peon

    Messages:
    3,386
    Likes Received:
    154
    Best Answers:
    0
    Trophy Points:
    0
    #7
    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 :)
     
    DarrenC, Oct 18, 2004 IP
  8. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #8
    [color=red].menubg {
    bgcolor: black;
    background-image: url("http://www.exclusivefreegames.com/images/tiledmenu.jpg");
    }[/color]
    Code (markup):
    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):

    [color=green].menubg {
    background-color: black;
    background-image: url("/images/tiledmenu.jpg");
    }[/color]
    Code (markup):
    [color=red]font {
    color: white;
    face: Veranda; 
    size: 3 
    }[/color]
    Code (markup):
    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:

    [color=green]font {
    color: white;
    font-family: Veranda, sans-serif; 
    font-size: medium;
    }[/color]
    Code (markup):
    It is also illegal to quote keywords, such as "red". For example, this is *not* a valid CSS selector:

    [color=red]p {color: "red";}[/color]
    Code (markup):
    In this example "red" is a string, not a keyword. This selector should look like this:

    [color=green]p {color: red;}[/color]
    Code (markup):
    You can use W3C CSS validator:

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

    J.D.
     
    J.D., Jan 3, 2005 IP