A link to your site might help.
http://byelliotowen.com
– in dev obviously. You can see it says ‘columntop’ which is the alt attribute of the img tag I put in the index and where the image shoudl be.
You could so this via the classes added to the <body> tag using pure CSS. Something like:
.contenttop {
width:570px;
height:30px;
background:url(images/byelliotowen-columntop.png) repeat-x;
}
.single .contenttop {
width: 450px;
}
added to style.css
cool, I think that got it. I will add some padding to the content background so that the top image sits above it then its perfect.
Thanks a lot esmi.
Actually, Im not getting the top image in the ‘single’ view. View with the sidebar is fine(narrowcolumn?) Did I understand you correctly with the below.
FYI – Im modifying the default WP theme.
index.php
<div class="contenttop"></div>
<div id="content" class="narrowcolumn" role="main">
style.css
.contenttop {
width:860px;
height:32px;
background:url(http://byelliotowen.com/wp-content/themes/byelliotowen/images/byelliotowen-contenttop.png) repeat-x;
}
.single .contenttop {
width:860px;
height:32px;
background:url(http://byelliotowen.com/wp-content/themes/byelliotowen/images/byelliotowen-contenttop-wide.png) repeat-x;
}
You need to add:
<div class="contenttop"></div>
<div id="content" class="widecolumn" role="main">
to your single.php template. Check through the other templates as well – archive.php, archives.php, image.php, links.php, page.php and search.php.
Ok, that worked a treat. Thanks again.
What do i need to do to get a similar result with the footer? At the moment I dont think the footer ‘knows’ whether the content is using a narrow or a wide column. I have tried putting a div in footer to be added after the WP footer content but the one is displayed all the time. See below.
in style.css
#footer {
background: #efefef url('images/byelliotowen-bg-ltr.png');
background-repeat: repeat-y;
border: none;
}
.contentbottom {
width:860px;
height:20px;
background:url(http://byelliotowen.com/wp-content/themes/byelliotowen/images/byelliotowen-contentbottom.png) repeat-x;
}
.single .contentbottom {
width:860px;
height:20px;
background:url(http://byelliotowen.com/wp-content/themes/byelliotowen/images/byelliotowen-contentbottom-wide.png) repeat-x;
}
footer.php
<div id="footer" role="contentinfo">
<!-- If you'd like to support WordPress, having the "powered by" link somewhere on your blog is the best way; it's our only promotion or advertising. -->
<p>
<?php bloginfo('name'); ?> is proudly powered by
<a href="http://wordpress.org/">WordPress</a>
<br /><a href="<?php bloginfo('rss2_url'); ?>">Entries (RSS)</a>
and <a href="<?php bloginfo('comments_rss2_url'); ?>">Comments (RSS)</a>.
<!-- <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. -->
</p>
</div>
<div class="contentbottom"></div>
</div>