Jump to content

basic CSS spacing between boarders

- - - - -

  • Please log in to reply
2 replies to this topic

#1
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
hi all,

okay i am trying to achieve a new look, basically i have the following code:

div#navigation1 li {

	border-left:1px solid #999;

	border-right:1px solid #999;

	float: left;

	width:101px;

	height: 22px;

	list-style:none;

	text-decoration: none;

}

this shows the two 1px borders close together, forming a 2px border. what i would like is for there to be say a 2px space between the two. This code does the job is all browsers apart from IE8??

Any help?

Thanks,
Jake

#2
BlaineSch

BlaineSch

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 2,448 posts
Hey Jake,

You can add a margin to the element to pad it from the other elements.

div#navigation1 li {
    border-left:1px solid #999;
    border-right:1px solid #999;
    float: left;
    width:101px;
    height: 22px;
    list-style:none;
    text-decoration: none;
    margin: 0px 1px;
} 


#3
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
OMG that seems so obvious now lol thanks so much, its been driving me crazy for ages :P.

Thanks,
Jake




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users