CSS Sidebar Issue
-
Hey I’ve recently built my own WP theme and modifying it now, I want to make the sidebar one solid block, where as before it was separated.
I have managed to remove the padding that was separating it, but It still as the bored, I want a bored around the entire sidebar but not individually, I believe that before I had it in a
- I have since changed that to a <div> hoping that would solve my issue, but it hasn’t. Below is my CSS code:
/* Theme Name: ahux Theme URI: http://www.adamhuxatble.com Description: New clean looking theme, black, grey and white Author: 'Adam Huxtable' Author URI: 'http://www.adamhuxatble.com' Version: 1.0 */ /* Reset */ html, body, div, span, object, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, address, code, img, small, strong, dl, dt, dd, ol, ul, li, fieldset, form, label { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; background: transparent; } body { font-family: helvetica, arial, sans-serif; } ol, ul { list-style: none; } /* End Reset */ h2 { font-size: 27px; } p { font-size: 14px; } a { text-decoration: none; color:#FFF; font-size: 14px; } a:hover { text-decoration: underline; } input { background: #FFF; border: 1px solid #c3c3c3; color:#000; padding: 3px; } input:focus, input:hover { background: #ededed; color: #4e4e4e; } /* Main Styles */ body { background: #6c8cd5 url(img/bg.jpg) repeat-x; } #wrap { width: 960px; margin: auto; } #header h1 { background: url(img/logo.png) no-repeat; width: 276px; height: 63px; text-indent: -9999px; float: left; } #header h1 a { width: 276px; height: 63px; display: block; } /* Navigation */ #header ul { overflow: hidden; padding-left: 20px; } #header ul li img { overflow: hidden; } #header ul li { float: left; margin-right: 40px; margin-top: 20px; } #header ul li a { color:#FFF; font-size: 18px; position: relative; top: -7px; left: 3px; } #header ul li a:hover { text-decoration: none; color: #6c8cd5; } #header li#rss { float: right; margin: 0; padding: 0; padding-right:5px; } li#rss img { padding-right: 1px; margin-top: 13px; } #header p#slogan { font-size: 2em; margin: 21px 0 31px 0; float: right; width: 544px; height: 38px; text-indent: -9999px; padding-right: 50px; } /* Main Content */ #main { clear: both; overflow: hidden; padding-bottom:20px; } #main #primary { float: left; width: 630px; } #main #sidebar { float: right; width: 300px; } #main #primary .post-item { background: #ededed; margin-bottom: 28px; border: 1px solid white; -moz-border-radius: 5px; -webkit-border-radius: 5px; overflow: hidden; padding-right: 40px; padding-bottom:10px; } .post-item img { float: left; padding: 30px 20px 30px 30px; } .post-item h2 { padding-top: 20px; } .post-item h2 a{ color:black; font-size:18px; } .post-item a{ color:black; font-size:14px; } .post-item p.meta { color: black; font-size: 11px; font-style: normal; margin-left: 200px; margin-bottom: 5px; min-width: 100px; padding-left:0px; } .post-item p { color: #7e7e7e; padding-bottom:14px; padding-left:14px } /* Next and Previous Buttons */ #morePrev a{ padding: 8px; color: black; font-size: 14px; font-style: italic; font-weight:bold; float: right; } .numComments a{ float:right; width:30px; text-align:center; margin:0 auto; padding:4px; background:black; color:white; border: 1px solid black; -moz-border-radius: 5px; -webkit-border-radius: 5px; } .secondaryBox, .widget { background: #ededed url(img/postBG.jpg) repeat-x; border: 1px solid white; -moz-border-radius: 5px; -webkit-border-radius: 5px; padding: 8%; overflow: hidden; -moz-border-radius-topleft: 5px; -webkit-border-top-left-radius: 5px; } #photos img { border: none; } #photos img.featuredImage { border: 1px solid black; margin: 0; padding: 0; width: 100%; } #photos p { float: left; color: #737373; } #photos .prevNext { float: right; } #photos .prevNext img { border: none; } .secondaryBox h3, .widget h2 { background: black; margin: 4% 0; color: white; border: 1px solid black; border-right: 1px solid #dfdfdf; border-bottom: 1px solid #dfdfdf; font-size: 12px; padding: 3px 0 2px 8px; font-weight: normal; } .secondaryBox ul#popPosts li { float: left; padding: 0 7px; } .secondaryBox ul#popPosts li img { border: 1px solid black; } .widget ul li { padding: 3px 0 3px; line-height: 22px; border-top: 1px solid #cccccc; border-bottom: 1px solid #cccccc; } .widget ul li.first { border-top: none; } .widget a { color:black; font-size: 12px; } .widget li span { font-size: .7em; padding-left: 13px; margin-left: 13px; color: gray; } /* Post Styles */ body.single div.tutorial_image { background: #e3e3e3; text-align: center; border: 1px solid white; padding: 20px; margin: 1em 0; } body.single div.wrap { background: #e3e3e3; text-align: center; border: 1px solid white; padding: 20px; margin: 1em 0; } body.single div.post-item h2 a{ padding:14px; } .single div.tutorial_image img{ border: none; text-align: center; border: 1px solid white; background: #6a6a6a; padding: 1px; margin: auto; margin: 0; float: none; } body.single div.post-item p { font-style: normal; } .single div.post-item ul { margin: 1em 0; color: #7e7e7e; } .single div.post-item ul li { padding-left: 1em; margin-left: 2em; list-style: disc; line-height: 2em; } .single div.post-item p.meta{ color:black; font-size:12px; margin:0px; padding-left:14px; } .single div.post-item ul li { padding:0px; margin:2px; } /*pages*/ body.pages div.tutorial_image { background: #e3e3e3; text-align: center; border: 1px solid white; padding: 20px; margin: 1em 0; } body.pages div.wrap { background: #e3e3e3; text-align: center; border: 1px solid white; padding: 20px; margin: 1em 0; } body.pages div.post-item h3 { padding-top:14px; padding-left:14px; } .pages div.tutorial_image img{ border: none; text-align: center; border: 1px solid white; background: #6a6a6a; padding: 1px; margin: auto; margin: 0; } body.pages div.post-item p { font-style: normal; } .pages div.post-item ul { margin: 1em 0; color: #7e7e7e; } .pages div.post-item ul li { padding-left: 1em; margin-left: 2em; list-style: disc; line-height: 2em; } .pages div.post-item p.meta{ color:black; font-size:12px; margin:0px; padding-left:14px; } .pages div.post-item img { padding:0px; margin:0px; } .sociable{ padding-left:14px; } #sidebar ul li:first-child { border-top: none; } #sidebar ul li:last-child { border-bottom: none; } #footer{ height:200px; background:#000; color:#FFF; max-width:960px; margin: 0 auto; } #footer ul li{ padding-bottom:10px; padding-left:10px; } #footer h4{ padding:10px; } #useful{ float:left; text-align:left; width:50%; } #other{ float:right; text-align:left; width:50%; } .copyright{ text-align:right; font-size:12px; padding-right:5px; } .advert{text-align:center; margin:0 auto; } .advert img{ padding:5px; } /* Comments Template */ #comments_template { margin-top: 2em; background: #ededed; border: 1px solid black; clear: both; margin-bottom: 28px; overflow: hidden; padding-right: 40px; padding-left: 30px; padding-top: 30px; padding-bottom:30px; -moz-border-radius:5px; -webkit-border: 5px; position: relative; } #comments_template input { background: white; margin-right: 10px; } #comments_template li { clear: left; border-bottom: 1px solid #d3d3d3; border-top: 1px solid white; padding: 2em 0; overflow: hidden; } #comments_template li:first-child { border-top: none; } #comments_template li:last-child { border-bottom: none; } #comments_template a{ color:black; } #comments_template .avatar { float: left; margin-right: 25px; background: #000; border: 1px solid black; border-right: none; border-bottom: none; padding: 4px; } .main_comment { background: white; margin-left: 133px; padding: 15px; position: relative; } .main_comment span.arrow { width: 0; height: 0; line-height: 0; border-bottom: 25px solid #ededed; border-right: 20px solid white; position: absolute; top: 10px; left: -20px; }
And below is the code for sidebar.php
<div id="sidebar"> <?php if(!function_exists('dynamic_sidebar') || !dynamic_sidebar()) : ?> <p> You're not using a dynamic sidebar, silly! </p> <?php endif; ?> </div><!--end secondary--> </div><!--end main-->
I’ve been playing with it for a while now but not having no luck.
Thanks in advance
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘CSS Sidebar Issue’ is closed to new replies.