content not centered with header and weird spaces?
-
I’m running cutline three column split at https://www.bloggingforjesus.net
I would like for my site to have a margine around the left and right side. It seems that I have the header and the nav bar centered, but the sidebars and content is where I am having trouble locating the right margin or padding code? I’m not sure what to look for. I would also like for the space below the header image and below the nav bar to disappear and don’t know where to find that either. I have searched, posted, and I am at my wits end.
-
here is the style.css
/*
Theme Name: Cutline 3-Column Split
Theme URI: https://pearsonified.com
Description: A squeaky clean, feature-rich theme for WordPress designed and coded by Chris Pearson.
Version: 1.1
Author: Chris Pearson
Author URI: https://pearsonified.com/
*/body { background: #523818; color: #333; font: 62.5% Georgia, “Times New Roman”, Times, serif; text-align: center; }
* { padding: 0; margin: 0; }
}
/*—:[ global elements ]:—*/
a { color: #0060ff; text-decoration: underline; }
a:visited { color: #333; text-decoration: underline; }
a:hover { color: #df0000; text-decoration: underline; }
a img { border: none; }
blockquote { font-style: italic; font-family: Georgia, “Times New Roman”, Times, serif; color: #555; margin: 0 50px 1.5em 50px; padding: 0 0 0 10px; /*border-left: 1px solid #aaa;*/ }
abbr, acronym { border-bottom: 1px dotted #aaa; text-transform: uppercase; cursor: help; }
code { color: #090; font-family: Courier, monospace; }
pre { margin: 0 0 1.5em 0; overflow: auto; font-size: 1.3em; clear: both; }
p.center { text-align: center !important; }
p.bottom { margin: 0 !important; }
p.unstyled { font-size: 1.4em; }
.flickr_blue { color: #007ae4; text-transform: lowercase; }
.flickr_pink { color: #ff2a96; text-transform: lowercase; }
.green { color: #090; }
.red { color: #f00; }
.orange { color: #f40; }
.purple { color: #909; }
/*—:[ headlines ]:—*/
h1, h2, h3 { font-weight: bold; font-family: Helvetica, Arial, sans-serif; color: #000; }
h1 { font-size: 3.6em; letter-spacing: -0.03em; }
#masthead h1 { padding: 0.4em 0 0.2em 0; /*border-top: 1px solid #ccc*/; text-align: center; clear: both; }
h1 a, h1 a:visited, h1 a:hover { color: #000; text-decoration: none; }
h2 { font-size: 2.0em; }
h2 a { color: #000; text-decoration: none; }
h2 a:visited { color: #555; text-decoration: none; }
h2 a:hover { color: #090; text-decoration: none; }
.posts h2 { margin: 0 0 0.1em 0; line-height: 1.2em; }
.pages h2, h2.page_header { margin: 0 0 0.75em 0; padding: 0 0 0.6em 0; background: url(‘images/hr_title_sep.gif’) 0 100% no-repeat; }
h2.archive_head { font-weight: bold !important; font-size: 1.4em !important; text-transform: uppercase !important; letter-spacing: normal !important; margin: 0 0 1.8em 0 !important; padding: 0.4em 2px !important; border-top: 3px solid #000 !important; background: url(‘images/hr_dot_black.gif’) 0 100% repeat-x !important; }
h3 { font-size: 1.0em; text-transform: uppercase; }
#masthead h3 { margin: 0 0 0.75em 0; font-weight: normal; font-size: 1.8em; text-transform: none; color: #888; text-align: center; }
.entry h3 { margin: 2.5em 0 0.5em 0; }
.entry h3.top { margin: 1.5em 0 0.5em 0 !important; }
h3.comments_headers { font-size: 1.4em; }
h4 { font: italic 1.2em Georgia, “Times New Roman”, Times, serif; color: #888; }
h4 a, h4 a:visited { color: #888; text-decoration: none; }
h4 a:hover { color: #888; text-decoration: underline; }
.posts h4 { margin: 0 0 1.25em 0; padding: 0 0 1.0em 0; background: url(‘images/hr_title_sep.gif’) 0 100% no-repeat; }
/*—:[ core layout elements ]:—*/
}
#container { width: 900px; margin: 15px 30px 0 30px; }#content_box { width: 900px; text-align: left; float: left; clear: both; }
#content { background: #ffffff; width: 450px; padding: 0 0 0 20px; float: left; }
#sidebar { background: #ffffff; width: 200px; padding: 0 0 0 15px; float: right; }
#l_sidebar { background: #ffffff; width: 200px; padding: 0 0 0 15px; float: left; }
#footer { width: 900px; padding: 1.2em 0 0 0; border-top: 2px solid #ccc; float: left; clear: both; }
/*—:[ header styles ]:—*/
#masthead { width: 900px; /*height: 194px; background: url(‘images/logo.gif’) no-repeat;*/ /* uncomment the height and background declarations here if you intend to use a graphic in the header instead of the h1 */ }
#masthead a { display: block; width: 900px; height: 194px; } /* uncomment this line if you use a graphic in the header – make sure the height of your header graphic is equal to the height declared in this line of code! */
ul#nav { list-style: none; width: 950px; margin: 0 50px 0 50px ; padding: 0 0px; /*background: url(‘images/hr_dot_black.gif’) repeat-x; border-bottom: 3px solid #000*/; float: center; }
ul#nav li { padding: 0.85em 40px 0.7em 0; font: bold 1.4em Helvetica, Arial, sans-serif; text-transform: uppercase; float: left; }
ul#nav li a, ul#nav li a:visited { color: #000; text-decoration: none; }
ul#nav li a:hover { color: #000; text-decoration: underline; }
ul#nav li a.current, ul#nav li a.current:visited, ul#nav li a.current:hover { color: #090; text-decoration: underline; }
ul#nav li.rss { padding: 0.85em 0 0.7em 0; float: right; }
ul#nav li.rss a { padding: 0 18px 0 0; background: url(‘images/icon_rss.gif’) 100% 50% no-repeat; }
#header_img { position: relative; margin: 0 0 0 0; /*border-bottom: 1px solid #000; float: left; clear: both;*/ }
#header_img img { display: block; } /* this is really just an IE 6 and 7 hack in disguise */
/*—:[ content styles ]:—*/
.entry { font-size: 1.4em; line-height: 1.65em; }
.entry blockquote { font-size: 1.0em; }
.entry blockquote.right { width: 200px; font-style: normal !important; font-size: 1.3em !important; margin: 0.3em 0 0.3em 15px !important; padding: 0.3em 0 !important; border: 3px double #aaa; border-width: 3px 0; text-align: center; float: right; }
.entry blockquote.left { width: 200px; font-style: normal !important; font-size: 1.3em !important; margin: 0.3em 15px 0.3em 0 !important; padding: 0.3em 0 !important; border: 3px double #aaa; border-width: 3px 0; text-align: center; float: left; }
.entry blockquote.right p, .entry blockquote.left p { margin: 0 !important; line-height: 1.4em !important; }
.entry p { margin: 0 0 1.5em 0; }
.entry ul, .entry ol { margin: 0 0 1.5em 40px; }
.entry ul { list-style-type: square; }
.entry li { margin: 0 0 0.5em 0; }
.entry ul li ul, .entry ul li ol, .entry ol li ul, .entry ol li ol { margin: 0.5em 0 0.5em 30px; }
.entry dl { margin: 0 0 1.5em 0; }
.entry dt { font-weight: bold; margin: 0 0 0.5em 0; }
.entry dd { margin: 0 0 1.5em 20px; }
.entry .ad { margin: 0 0 0.5em 15px; float: right; }
.entry .ad_left { margin: 0 15px 0.5em 0; float: left; }
.entry img { }
.entry img.left { padding: 3px; margin: 0.5em 15px 0.5em 0; border: 3px double #bbb; float: left; clear: left; }
.entry img.right { padding: 3px; margin: 0.5em 0 0.5em 15px; border: 3px double #bbb; float: right; clear: right; }
.entry img.center { display: block; padding: 3px; margin: 0 auto 1.5em auto; border: 3px double #bbb; float: none; clear: both; }
.entry img.off { padding: 0 !important; border: none !important; }
.entry img.stack { clear: none !important; }
.tagged { padding: 0.4em 0 0 0; background: url(‘images/hr_tag_sep.gif’) no-repeat; font-size: 1.2em; line-height: 1.6em; color: #888; clear: both; }
.tagged a, .tagged a:visited { padding: 0.25em; color: #333; text-decoration: none; }
.tagged a:hover { color: #fff; background: #333; text-decoration: none; }
.add_comment { display: block; padding: 0 0 0 20px; font-weight: bold; float: right; }
.navigation { width: 500px; font-size: 1.4em; float: left; }
.previous { padding: 0 20px 0 0; float: left; }
.next { float: right; }
.clear { width: 500px; height: 1px; margin: 0 0 5.0em 0; clear: both; }
.rule { background: url(‘images/hr_tag_sep.gif’) no-repeat; }
.flat { margin: 0 0 2.0em 0 !important; }
.whitespace { margin: 0 0 3.5em 0 !important; }
/*—:[ sidebar styles ]:—*/
ul.sidebar_list { list-style: none; }
ul.sidebar_list li.widget, ul.sidebar_list li.linkcat { width: 200px; margin: 0 0 2.5em 0; font-size: 1.3em; line-height: 1.4em; float: left; }
li.widget h2, li.linkcat h2 { font-weight: bold; font-size: 1.077em; text-transform: uppercase; letter-spacing: normal; margin: 0 0 0.8em 0; padding: 0.4em 2px; border-top: 1px solid #000; /*background: url(‘images/hr_dot_black.gif’) 0 100% repeat-x*/; }
li.widget p { margin: 0 0 1.5em 0; padding: 0 10px; }
li.widget ul, li.linkcat ul { list-style: square; margin: 0 0 0.5em 20px; }
li.widget ol, li.linkcat ol { margin: 0 0 0.5em 20px; }
li.widget li, li.linkcat li { margin: 0 0 0.7em 0; }
li.widget li a, li.widget li a:visited, li.linkcat li a, li.linkcat li a:visited { text-decoration: none; }
li.widget li a:hover, li.linkcat li a:hover { text-decoration: underline; }
li.widget li .recent_date { padding: 0 0 0 8px; font-weight: bold; color: #888; }
li.widget ul.flickr_stream { list-style: none; margin: 0; padding: 0 10px; }
li.widget ul.flickr_stream li { margin: 0; padding: 0 5px 5px 0; display: inline; }
li.widget ul.flickr_stream li a img { padding: 3px; }
li.widget ul.flickr_stream li a:hover img { background: #ff2a96; }
/*—< FlickrRSS styles for the widget only >—*/
li.widget_flickrrss { }
li.widget_flickrrss a img { margin: 0 5px 5px 0; padding: 3px; }
li.widget_flickrrss a:hover img { background: #ff2a96; }
/*—< Calendar widget styles >—*/
#calendar_wrap { font-size: 1.3em; }
/*—:[ footer styles ]:—*/
#footer p { margin: 0 0 0.923em 0; font-size: 1.3em; color: #888; text-align: right; }
#footer a, #footer a:visited { color: #888; text-decoration: none; }
#footer a:hover { color: #888; text-decoration: underline; }
/*—:[ comment styles ]:—*/
#comments { width: 500px; float: left; clear: both; }
ul#comment_list { list-style: none; margin: 0 0 4.0em 0; border-top: 1px solid #bbb; float: left; }
ul#comment_list li.comment { width: 500px; padding: 1.2em 0 0 0; border-bottom: 1px dotted #bbb; float: left; }
ul#comment_list li.trackback { width: 470px; padding: 1.2em 15px 0 15px; background: url(‘images/trackback_bg.gif’); }
.comment_meta { margin: 0 0 1.2em 0; }
.comment_num { padding: 0 15px 0 20px; font-weight: bold; font-size: 1.4em; float: right; }
.trackback .comment_num { padding: 0 0 0 20px; }
.comment_num a, .comment_num a:visited { color: #888; text-decoration: none; }
.comment_num a:hover { color: #df0000; text-decoration: none; }
.comment_meta strong { font-size: 1.6em; }
.comment_time { font: normal 1.1em Verdana, Helvetica, Arial, sans-serif; color: #888; }
.comment .entry { padding: 0 15px; }
.comment .entry p { margin: 0 0 1.0em 0; }
/*—:[ comment form styles ]:—*/
#comment_form { width: 500px; padding: 1.0em 0 0 0; float: left; }
#comment_form p { padding: 0.6em 0; }
#comment_form label { padding: 0 0 0 10px; font-size: 1.2em; }
#comment_form .text_input { width: 191px; padding: 3px; color: #444; font: normal 1.4em Georgia, “Times New Roman”, Times, serif; border-top: 2px solid #999; border-left: 2px solid #999; border-right: 1px solid #fff; border-bottom: 1px solid #fff; }
#comment_form .text_area { width: 321px !important; }
#comment_form .text_input:focus { border-top: 2px solid #666; border-left: 2px solid #666; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; }
#comment_form .form_submit { padding: 0.4em 4px; background: url(‘images/submit_bg.gif’); border: 3px double #999; border-top-color: #ccc; border-left-color: #ccc; font: bold 1.4em Georgia, “Times New Roman”, Times, serif; cursor: pointer; }
#comment_form p.subscribe-to-comments { font-size: 1.4em; }
#comment_form p.subscribe-to-comments label { font-size: 1.0em; }
/*—:[ search form styles ]:—*/
#search_form { }
#search_form .search_input { width: 150px; padding: 3px; color: #090; font: normal 1.0em Georgia, “Times New Roman”, Times, serif; border-top: 1px solid #999; border-left: 1px solid #999; border-right: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5; }
li.widget .search_input { font-size: 1.1em !important; }
#search_form .search_input:focus { border-top: 1px solid #666; border-left: 1px solid #666; border-right: 1px solid #ddd; border-bottom: 1px solid #ddd; }
For starters, I am guessing that where you have:
<ul id="nav">
that probably needed to be<div id="nav"> <ul>
mainly because you vhave a closing
</div>
right before
<div id="content_box">
which I think closes that box.
Also, at the end of your list before you close it, you have:
<li class="rss"><a href="https://bloggingforjesus.net/?feed=rss2"></a></li>
I expect that including this in your nav list is throwing off the alignment of the nav bar, but again I’m guessing. Try moving it out of that list, or just getting rid of it for now, and see what you get.when I got rid of it before, the whole list would screw up, but I changed the ul-nav thing and it got it closer – there is still a small space, but I can live with that – I am still stumped on how to get the white part to line up? How does it look on your end? I’ve tried ie and firefox
OK, you posted your css while I was replying, so it appears that the code you have
<ul id="nav">
will be styled, but you still have the spare</div>
. Loking at your css, I think you need
<div id="container">
right after your body tag, but I’m still not sure that fixes your issue, because the spare</div>
would close this right after the nav, which doesn’t seem to make sense.I’m sure someone else will jump in here, I will take a look at this in more detail a bit later if no one does.
Ok, sorry, I spoke too soon, you probably want to put back
<ul id="nav">
I don’t code CSS that way, and should have looked at your style sheet before I wrote.that’s ok – I tried adding <div id =”container”> and it did not work –
I’m not going to give up though – I have had this theme for a while and have had this issue with wanting all of the page in the middle so you can see the brown all the way around, I haven’t been able to figure it out, have tried other themes and keep coming back to this one. ???? Long day!Wow… i’m looking through your source code and I have to say it needs a lot of work. Here’s my first tip for l_sidebar, fix this and we’ll move on to fix other things.
Lets start with your l_sidebar
you have<div id="l_sidebar"> <ul class="sidebar_list"> <li id="text-1" class="widget widget_text"> <div class="textwidget"><a href = "https://bloggingforjesus.net/?page_id=8>Bible Study</a> <a href = https://bloggingforjesus.net/?page_id=9>Devotional</a> <a href="https://bloggingforjesus.net/? page_id=10">Staying Healthy</a></br> <a href="https://bloggingforjesus.net/? page_id=11">Making Ends Meet</a></br> <a href="https://bloggingforjesus.net/?page_id=12">Housework</a></br> <a href="https://bloggingforjesus.net/?page_id=13">Marriage</a></br> <a href="https://bloggingforjesus.net/?page_id=14">Parenting</a></br> <a href="https://bloggingforjesus.net/?page_id=15">Missionaries</a></br> <a href="https://bloggingforjesus.net/?page_id=16">Entertainment</a></br> <a href="https://bloggingforjesus.net/? page_id=17">Prayer Requests</a></br>
First, when you use
<ul>
stands for unordered list… within a UL EVERY element needs to have an<li></li>
around it (list element).So. You need
<li><a href="https://bloggingforjesus.net/?page_id=12">Housework</a></li>
etc for all the elements. Secondly do not usetags, ever, with CSS based markup. There is no need to use BR’s with UL. If you want a bit of space between every item in your list then you style it with the following CSS.
#l_sidebar li { padding-bottom: 5px; }
That makes it so that every LI inside of #l_sidebar recieves a 5px padding on the bottom. See what i’m saying? Thirdly, you have a DIV INSIDE your UL… I don’t understand the purpose for that. Very very very rarely should you have a DIV inside a UL. I’m using cutline 3 for my website as well ( https://www.decoratelife.net ) so i’m familiar with the layout of it. Fix these problems and we’ll work on getting the alignment right.
I don’t know how to fix this because I don’t know how the author of this theme intended for this layout to work. Here is what I think I see:
* You have two closing divs that don’t close anything, one before the content-box div, and the other one right before the end of your document. I have to think that you are missing opening divs. It follows that one of them is container, which is probably supposed to enclose everything, that’s why I had you put it where you did, but the first closing div closed container, so it does not enclose the content. So you might have another opening DIV that was supposed to open right after container, and again I’m guessing that was masthead.
* I think div content_box was supposed to enclose your three floating columns, l_sidebar, content and sidebar, because it is 900 pixels wide, but right now it closes before the content div, and I suspect that throws all three columns off. I can’t figure out this float scheme with the three columns, so I could be wrong.This is just what I see. You might do best looking at the original theme again to see what the intent was, and whatever documentation the author left.
To my knowledge the flow is like this
<container 900px wide> <masthead 900px wide></masthead> <content-box 900px wide> <column 1 float: left> <column 2 float: left> <column 3 float: right> </content-box> <footer></footer> </container>
I fixed it by changing float:
/*—:[ core layout elements ]:—*/
}#content_box { width: 900px; text-align: left; float: left; clear: both; }
I changed this to float: center
I am still working on the space under the header image and under the nav bar. Driving me nuts!
- The topic ‘content not centered with header and weird spaces?’ is closed to new replies.