Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts

    CSS Border behavior in browsers

    I have a little question abouth CSS Border behavior in difrent browsers

    If i have set some border style like this

    div {
    border-top-widht: 10px;
    porder-top-style: solid;
    }

    div.somename {
    border-widht: 0 10px;
    porder-style: dashed;
    }

    and then later writes

    div {
    border-color: #00ff00;
    }

    Will anny browser make a border all around the divs ???
    (Can a border color trick anny browser to make a border if width and/or style is not set ?)
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #2
    Regular Coder optimus203's Avatar
    Join Date
    Sep 2008
    Location
    CT
    Posts
    317
    Thanks
    22
    Thanked 16 Times in 15 Posts
    You spelled width incorrectly which will cause issues. IE might have some issues: http://www.webcredible.co.uk/user-fr...explorer.shtml
    Always thank those CF Users who help you solve issues...
    Connecticut Web Design

  • #3
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by optimus203 View Post
    You spelled width incorrectly which will cause issues. IE might have some issues: http://www.webcredible.co.uk/user-fr...explorer.shtml
    Oh .. Sorry for that ... that was deffently not my intension


    But what if ihad spelled all corectly ?
    Can a border color trick anny browser to make a border if width and/or style is not set ?
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #4
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    It is a good idea to put this code at the very start of your CSS.

    Code:
    *{ padding:0;
    margin:0;
    border:0;}
    It makes sure that the browser is reset to zero before it deals with you css code.

    Frank
    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #5
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Can a border color trick anny browser to make a border if width and/or style is not set ?
    How about having a test at your end using all major browsers available?
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #6
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by abduraooft View Post
    How about having a test at your end using all major browsers available?
    I woud love to test in IE if i had IE for my mac

    I have done some testing ... but i was thinking perhaps someone have had anny experience with border color trick anny browser to make a border if width and/or style is not set
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #7
    Regular Coder optimus203's Avatar
    Join Date
    Sep 2008
    Location
    CT
    Posts
    317
    Thanks
    22
    Thanked 16 Times in 15 Posts
    I run a mac too. Look at http://winebottler.kronenberg.org/ , which lets you run IE6-8 on mac, and also check out http://www.browsershots.org
    Always thank those CF Users who help you solve issues...
    Connecticut Web Design

  • #8
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    thanks for the link http://winebottler.kronenberg.org/ ill look into that

    I know browsershot .. but think its very slow .. have a lot of browseres but is very slow to use
    For explore test i more use http://www.ipinfo.info/netrenderer/
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #9
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    But it stil dosnt answer my actualy cuestion I proberly didnot askd it proberly (sorry for that, my english is not that god)

    Ill try to refraise it:

    If one only specify border-color .. is a browser supposed to make a border even if there is not specifyd width and/or style ??? ...
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"

  • #10
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    div { border-color:red; } will apply the color red to any div with a border.

    if you don't specify a width/style then you won't see the border, but it would be red if you had.

  • #11
    Regular Coder Jesper Møller's Avatar
    Join Date
    Jun 2006
    Location
    Denmark, Copenhagen
    Posts
    138
    Thanks
    9
    Thanked 0 Times in 0 Posts
    Thank you
    "True knowledge exists in knowing that you know nothing."

    "Education is learning what you didn't even know you didn't know!"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •