Weird CSS stuff

Discussion in 'CSS' started by webguy84, May 25, 2009.

  1. #1
    Hi all,

    I have a weird question, consider the following code:

    <style>
    #test{display:block;width:200px;height:200px;border:#000 3px solid;padding:10px;margin:50px;background:red;color:white;}
    </style>
    <div id="test">TESTTESTTEST</div>


    I added the above code to an html file and all appears fine, in the broswer a box appears as it should.

    On the other hand when I add <div id="test">TESTTESTTEST</div> to the html file and #test{display:block;width:200px;height:200px;border:#000 3px solid;padding:10px;margin:50px;background:red;color:white;} to a css file and link the css file to the html nothing happens.

    Howcome this is happening? I check plenty of times that I am linking the html file to the correct css and I am sure that it is correct. (I did it plenty of times before) Howcome it doesn't work? Thx
     
    webguy84, May 25, 2009 IP
  2. misbah

    misbah Active Member

    Messages:
    265
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    68
    #2
    misbah, May 25, 2009 IP
  3. webguy84

    webguy84 Well-Known Member

    Messages:
    815
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    128
    #3
    @misbah thx i ll try it out and let you know
     
    webguy84, May 26, 2009 IP