I'm nearly done porting a layout into Wordpress, but I'm stuck with a couple of CSS issues.
The original, static version can be viewed here and the dynamic version can be viewed here.
The 2 problems as are follows:
* The bottom right corner doesn't go right to the side of the page like it does on the static version. I think I crossed a wire when I did the porting to Wordpress but I can't see where I went wrong. * The content block is absolutely buggered. Since I'm planning on using WP as a CMS (via Ryans Simple CMS), the ability to edit the image and the text is imperative.
I've been wracking my head around these problems and have drawn a blank. Perhaps some input from the CSS-Tricks community would help. :)
The static version has the CSS embedded in the HTML. I'll post the code for index.php below:
@apostrophe - Coda wasn't saving my changes when I was tidying up the code for validation. The crux of the problems were in the sidebar, so I changed it to an unordered list and it seemed to fix the problem.
@TheDoc - thanks. I can't change 'alignleft' because Wordpress uses the class for image alignment now. I added the extra lines into the CSS and it works like it's supposed to. I'm aware the min-height, but it doesn't really concern me since there's text going in there in the future and it works out (check the site to see what I mean)
The corner is in the right place now, but there's a gap between it and the footer. Here's the revised CSS - I should tidy that up as wel since I've just noticed some repetition:
#wrapper{ width:995px; background:url(img/spacer.gif) repeat-y; /* WARNING: IF YOU CHANGE THE COLORS OF THE LAYOUT YOU HAVE TO CHANGE THIS IMAGE! */ overflow:auto; /* USE FIREFOX GUYS! WE ONLY NEED THIS LINE BECAUSE INTERNET EXPLODER ISN'T READING CODE PROPERLY */ background: url(img/toprightcnr.jpg) no-repeat top right; }
/* ----- NAVIGATION ----- */
#sidebar-container { width:245px; min-height:500px; /* for modern browsers */ height:auto !important; /* for modern browsers */ height:500px; /* for IE5.x and IE6 */ float:right; margin-top: 40px; padding-right: 10px; }
#content-container { width:712px; /*min-height:500px; for modern browsers */ /*height:auto !important; */ for modern browsers */ /*height:500px; */ for IE5.x and IE6 */ margin-top:10px; padding-left: 5px; }
The original, static version can be viewed here and the dynamic version can be viewed here.
The 2 problems as are follows:
* The bottom right corner doesn't go right to the side of the page like it does on the static version. I think I crossed a wire when I did the porting to Wordpress but I can't see where I went wrong.
* The content block is absolutely buggered. Since I'm planning on using WP as a CMS (via Ryans Simple CMS), the ability to edit the image and the text is imperative.
I've been wracking my head around these problems and have drawn a blank. Perhaps some input from the CSS-Tricks community would help. :)
The static version has the CSS embedded in the HTML. I'll post the code for index.php below:
The main piece of CSS which is making it hard is this one.
.content-text {style.css (line 144)font-family:Arial,Helvetica,sans-serif;
font-size:10pt;
margin-left:260px;
}
Help would be appreciated. :)
Change the class name on your image from "alignleft" to "contentleft" and add a new class to your css file:
.contentleft {
margin-left:-260px;
float:left;
}
You will also need to add a clearing div at the end of the content:
<div class="clear"></div>
Add this to your CSS:
.clear {
clear:both;
}
The clear will also fix the image in the bottom right lining up properly.
You seem to have a min height on the content area, but I can't seem to get rid of it.
@TheDoc - thanks. I can't change 'alignleft' because Wordpress uses the class for image alignment now. I added the extra lines into the CSS and it works like it's supposed to. I'm aware the min-height, but it doesn't really concern me since there's text going in there in the future and it works out (check the site to see what I mean)
The corner is in the right place now, but there's a gap between it and the footer. Here's the revised CSS - I should tidy that up as wel since I've just noticed some repetition:
.footernav {padding-top:15px;
margin:0;
}
Fixes it. The browser default settings are giving you a margin on all paragraphs, that's why most people begin with a css reset.