Using maring property

Discussion in 'CSS' started by boba5555, Feb 25, 2009.

  1. #1
    boba5555, Feb 25, 2009 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    That's up to you, px, pt, em, %, etc.. To fail to declare the metric for any value other than zero is an error.

    A non replaced inline element is one like <span>, where the tags label the enclosed text. A replaced element is one like <img>, or <input> where there is no enclosed content. The actual content, the image or the form control widget, replaces the element.

    That help?

    cheers,

    gary
     
    kk5st, Feb 25, 2009 IP
  3. boba5555

    boba5555 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, part of the reply helps and thanks for answering me ;)

    Btw, the part that I sill don't understand is about margin-left example. However, I tried this
    
    .t1{
    	margin-left: 200
    }
    
    .t2{
    	margin-left: 200px
    }
    
    Code (markup):
    and html
    
    	<h1 class="t1">Test1</h1>
    	<h1 class="t2">Test2</h1>
    
    Code (markup):
    It seems to be the same, like don't specifying unit is same like you have specified px, but I can't find it in specification. Maybe browser (FireFox, Opera and IE in my case) just handle it in that way. Do you know why it is set for px to be "default unit"?
     
    boba5555, Feb 25, 2009 IP
  4. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #4
    No, but I wouldn't depend on it. Simply do it correctly.

    cheers,

    gary
     
    kk5st, Feb 25, 2009 IP
  5. boba5555

    boba5555 Peon

    Messages:
    33
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Ok. Thanks for helping me.
     
    boba5555, Feb 25, 2009 IP