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.

Problem with ff

Discussion in 'CSS' started by genius, Sep 2, 2006.

  1. #1
    I have this code
    .infobox {
    	background-color: #EFF3FC;
    	margin: 5px;
    	padding: 5px;
    	border-top: 1px solid #2657CA;
    	border-right: 5px solid #2657CA;
    	border-bottom: 1px solid #2657CA;
    	border-left: 5px solid #2657CA;
    }
    Code (markup):

    if I put in an external file like <link rel="stylesheet" href="css/1.css" type="text/css" media="screen,projection" /> in ie it works fine but in firefox it doesn't.If I leave it in the page with <style>code</style> it works fine in ff and ie.What should I do ?
     
    genius, Sep 2, 2006 IP
  2. XandroZ

    XandroZ Peon

    Messages:
    395
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try to use like this
    <link href="../../example.css" rel="stylesheet" type="text/css">
     
    XandroZ, Sep 2, 2006 IP
  3. genius

    genius Well-Known Member

    Messages:
    535
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Doesn't work ..it's the same thing
     
    genius, Sep 3, 2006 IP
  4. sundaybrew

    sundaybrew Numerati

    Messages:
    7,294
    Likes Received:
    1,260
    Best Answers:
    0
    Trophy Points:
    560
    #4
    <link href="/pimps/styles.css" rel="stylesheet" type="text/css">
    PHP:
     
    sundaybrew, Sep 3, 2006 IP
  5. genius

    genius Well-Known Member

    Messages:
    535
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #5
    Still doesn't work .. in ff it doesn't work,in ie it works fine.Other solutions ?
     
    genius, Sep 3, 2006 IP
  6. Mano70

    Mano70 Peon

    Messages:
    42
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Show us the problem page if not this will be just guessing.
     
    Mano70, Sep 3, 2006 IP
  7. genius

    genius Well-Known Member

    Messages:
    535
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #7
    genius, Sep 3, 2006 IP
  8. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #8
    You're missing the
    <head>
    Code (markup):
    element.

    You need:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>Site Title</title>
    <link href="css/1.css" rel="stylesheet" type="text/css"> 
    </head>
    Code (markup):
     
    AdamSee, Sep 3, 2006 IP
  9. genius

    genius Well-Known Member

    Messages:
    535
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #9
    Take a look now ..it's modified ..and it doesn't work.
     
    genius, Sep 3, 2006 IP
  10. AdamSee

    AdamSee Well-Known Member

    Messages:
    422
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    135
    #10
    AdamSee, Sep 4, 2006 IP
  11. draculus

    draculus Peon

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #11
    The external css file has some significant errors that will prevent the selectors at the bottom of the file from being recognised.

    move the .infobox class to the top of the file and you may see it work.

    In particulare each block of three selectors for the headers has an extra closing curly brace.

    You also need the self closing slash in your link tag when declaring xhtml.
     
    draculus, Sep 4, 2006 IP
  12. draculus

    draculus Peon

    Messages:
    63
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #12
    These are the errors reported by the w3cs css validator

    * Line: 20 Context : #wrapper

    Invalid number : width Parse Error - this.width > 320 ? "320px" : this.width)
    * Line: 27 Context : * html #wrapper

    Invalid number : width Parse Error - document.documentElement.clientWidth > 1200 ? "1200px" : "auto")
    * Line: 426 Context : h7

    Invalid number : font-size only 0 can be a length. You must put an unit after your number : 9
    * Line: 428

    Parse error - Unrecognized : }
    * Line: 431 Context : h8

    Invalid number : font-size only 0 can be a length. You must put an unit after your number : 12
    * Line: 433

    Parse error - Unrecognized : }
    * Line: 469

    Parse error - Unrecognized : }
     
    draculus, Sep 4, 2006 IP
  13. genius

    genius Well-Known Member

    Messages:
    535
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    108
    #13
    Now it works,thank you very much for your help
     
    genius, Sep 4, 2006 IP