Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

JackT06

macrumors 6502
Original poster
Jul 24, 2009
293
0
I need to make it so that the background of the header and the border of the text will fit to the content inside the box, how can i do that? I have attached the code bellow and a screenshot to make it easier.

CSS STYLESHEET
Code:
#rightnav
{
float: right;
width: 350px;
padding: 1em;
background-color: #FFF;
margin-top: 10px;
margin-bottom: 10px;
}

#rightnav h1
{
text-transform: uppercase; 
color: #FFF;
background-color: #84A40B;
padding-top: 10px;
padding-left: 10px;
padding-bottom: 10px;
margin: 0px;
}

#rightnav p
{
color: #000;
border-style: solid;
border-width: 1px;
border-color: #84A40B;
padding: 1px;
}

Big thanks in advance!
 

Attachments

  • width_to_content.png
    width_to_content.png
    81.3 KB · Views: 83
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.