Jump to content

Recommended Posts

Hello all,

 

I have a content box with text and other items on the inside. At the moment the person who designed my website made it so that I have to add padding to the css of every item inside the content box.

 

I was wondering if it was possible to make it default for all items inside the content box has padding, cutting the amount of code required.

 

Here's the current code for that area:

 

#maincontent {
margin-left:220px;
margin-right:220px;
padding:20px;
}

.contentbox {
border:1px solid #bbbbbb;
background:#dadada url(images/mainboxbg.png) repeat-x;
margin-bottom:15px;
padding:10px 0 10px 0;
}

.contentbox p, .contentbox h1, .contentbox h2, .contentbox h3 {
  padding: 0 10px 0 10px;
}

.contentbox h1 {
font-size: 14px;
color: #3969a0;
font-weight:bold;
}

.contentbox h2 {
font-size: 12px;
color: #757575;
font-weight:normal;
}

.contentbox h3 {
font-size: 12px;
color: #3969a0;
}

.contentbox a {
text-decoration:none;
color: #3969a0;
}

.contentbox a:hover {
color:#000;
text-decoration:none;
}

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/65682-solved-padding-on-a-content-box/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.