looks different in firefox

Discussion in 'CSS' started by rojojat, Mar 1, 2009.

  1. #1
    Hi,
    I am a new to css. I am doing some practice with div and have a question.heres the code.

    html>
    <head><title>div</title>
    <style>
    #1{width:300;height:400;border:1px solid #000000}
    #a{width:150;height:150;border:1px solid #000000}
    </style>
    </head>
    <body>
    <div id="1"><div id="a"></div></div>
    </body></html>

    This experiment shows the borders in IE. but not in Firefox.
    How do I get them to show in ff.
    Thank You
     
    rojojat, Mar 1, 2009 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    An id or class toen may not begin with a numeral; letter only.

    cheers,

    gary
     
    kk5st, Mar 1, 2009 IP
  3. rojojat

    rojojat Peon

    Messages:
    43
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank You.
     
    rojojat, Mar 1, 2009 IP
  4. dickieknee

    dickieknee Active Member

    Messages:
    441
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #4
    put your css into an external file, makes the code easier to read as well as google does not like code bloat
     
    dickieknee, Mar 4, 2009 IP
  5. Jaden-Ellett

    Jaden-Ellett Peon

    Messages:
    55
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yep don't name your id or class's anything that relates to css. It will produce varied outcomes on different browsers!
     
    Jaden-Ellett, Mar 6, 2009 IP