Kemik Posted August 19, 2007 Share Posted August 19, 2007 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. Quote Link to comment Share on other sites More sharing options...
emehrkay Posted August 19, 2007 Share Posted August 19, 2007 yeah, its already defined in your content box padding:10px 0 10px 0; top left bottom right Quote Link to comment Share on other sites More sharing options...
Kemik Posted August 19, 2007 Author Share Posted August 19, 2007 Hello, The paragraphs all sit inside the contents box fine, but forms don't. Here's an example: http://www.ocwars.com/v2/index.php/news/comments/1 Quote Link to comment Share on other sites More sharing options...
Kemik Posted August 19, 2007 Author Share Posted August 19, 2007 Fixed. I changed the 10px 0 10px 0 to 10px. I could have sworen I tried that before. Oh well I must have forgotten to remove the 0 10px 0 10px from the .contentbox p, .contentbox h1, .contentbox h2, .contentbox h3 Thanks anyway. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.