Why isn't Firefox showing a border?

Discussion in 'CSS' started by emailarron, Jan 9, 2012.

  1. #1
    I am using this CSS

    .editbox {
    width: 100%;
    background-color: ffffff;
    -moz-border-radius: 9;
    -webkit-border-radius: 9;
    border-radius: 9;
    border: 2 dashed cccccc;
    display: inline-block;
    padding: 10 10;
    text-align: left;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    -ms-box-sizing: border-box;
    margin-top:5px;
    margin-bottom: 5px;
    }

    And the border shows perfectly in Chrome and IE, but Firefox (rounds the edges) but doesn't show the dashed border...

    stumped!
     
    emailarron, Jan 9, 2012 IP
  2. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hey there,

    I see so many errors and bad practices here that im going to help you out...

    1) Hex colour codes have to be preceded by a hash ( # ).
    2) None of your values have been defined any unit. i.e. px/pt/em.
    3) Lack of shorthand use.
    4) Lack of indentation.
    5) Lack of proper ordering ( prefix values should precede generic because otherwise as the browser rolls out the generic property, your stylesheet will still pickup and use the prefixed property instead over-riding the generic which is what you want.
    6) Alphabetically ordered css is far easily to scan.

    Fix all these and you may be able to debug slightly easier. It may even fix your problem completely.

    .editbox {
    	background-color: #ffffff;
    	-webkit-border-radius: 9px;
    	-moz-border-radius: 9px;
    	border-radius: 9px;
    	border: 2px dashed #cccccc;
    	-webkit-box-sizing: border-box;
    	-moz-box-sizing: border-box;
    	-ms-box-sizing: border-box;
    	box-sizing: border-box;
    	display: inline-block;
    	margin: 5px 0px;
    	padding: 10px 10px;
    	text-align: left;
    	width: 100%;
    }
    Code (markup):
    You may also want to look into em's as your preferred unit... fixed layouts are old business.
     
    Oxi, Jan 10, 2012 IP
  3. rlvassallo

    rlvassallo Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    riddle.pl/emcalc/ in case you need a reference.
     
    rlvassallo, Jan 18, 2012 IP