Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.

  1.  permalink
    I was curious as to which is correct in this example, I have already specified "border: 1px solid black;" but I do not want there to be a top border:

    border-top: 0px;
    or
    border-top: none;

    both work in most browsers, but I was wondering which one is more correct...
    • CommentAuthoradmin
    • CommentTimeDec 24th 2005
     permalink
    They are both valid I believe...

    So either one.
    •  
      CommentAuthorSpookyET
    • CommentTimeDec 24th 2005
     permalink
    border-top: 0;
    • CommentAuthorGustavs
    • CommentTimeDec 25th 2005
     permalink
    Hmm, well technically the border-top: none; or border-top: 0; (with out the px unit specifed) is more correct becouse then it's not appearing at all, but with 0px it's showing it but 0px width. Well, maybe it's not how CSS draws it but technically it would be like that.

    But they both are valid and you can use any of them.
    • CommentAuthorSam K
    • CommentTimeDec 25th 2005
     permalink
    border-top: 0;
    • CommentAuthorpairacy
    • CommentTimeDec 25th 2005
     permalink
    for any value that you assigned as 0, you dont have to put the measurement unit anymore.. coz whatever unit you put there, the browser still read it as 0, so save some space to reduce your css size.. :)

    anyway, for "border", between "none" and "0"? i prefer "0"... why? coz usually we use border with 'value'.. so, by putting "0" will make it much easier and nice to see when you browse through your css.. :)
Add your comments
    Username Password
  • Format comments as (Help)