Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

whitespace between border and element? 1

Status
Not open for further replies.

tiamat2012

Programmer
Dec 12, 2004
144
US
Is it possible? I'm trying to put a 3px whitespace between the border of one of my divs and the border.

If its not, should I just put a div around it with 3px margin with the border instead?

Thanks,
Kerry
 
What's a snow border? I'm giving my div a background color, but I want whitespace between it and a border (which I am making it red).

Thank you,
Kerry
 
Ah, if I understand you correctly, you'll need two divs to do that:
Code:
<div class="double"><div>
Content goes here!
</div></div>
Then you can style it like this:
Code:
div.outer {
   border: 1px solid red;
   background: white;
   padding: 3px;
}

div.outer div {
   background: red;
}


-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top