How can I make a 160x600 block outside the Wordpress Container?

efeezy

New member
Oct 5, 2007
5,250
136
0
50
What I want to do is have a 160x600 skyscaper ad on the left and right side of my wordpress site, but outside the main container/wrapper. Preferably just at the top of each side, starting just below the header. I've messed around with a bunch of css and I just can't figure out a way to make it work. If anyone has any tips or suggestions to try, I'm willing to try anything. Thanks.
 


Have you messed around with positioning? absolute vs relative.

You could also add another wrapper.

[ [addiv] [content] [addiv] ]
 
Ok Im getting pretty close. What I've done is ad this to the header

Code:
<div style="position:relative;width:1300px; margin:0 auto;">
<div style="width:160px; left:-100;top:75px; position:absolute; height:600px; background-color:gray;">/////AD CODE GOES HERE\\\</div>

and then I put a </div> in the footer to close it. I've got it working on the left side, just need to get the right.

The only other issue I have is that I only want this to show on single.php, not on the homepage and every other page.
 
if (substr($_SERVER['REQUEST_URI'], 0, 5) == '/single.php') {
echo '<div id="img_div"><img src="yourimage.png"></div>';
}

Hmm, I can't make that work in the header. I've got the banners positioned where I want them now. I just need to get the single.php only sorted out. Any suggestions? Thanks for the help so far. It's taken me days to get to this point.
 
Scratch that.. I just used this and it works fine.

<?php if (is_single()) {
?>
<div style="width:160px; left:1145px;top:70px; position:absolute; height:600px; background-color:none;"> ////AD CODE HERE\\\\ </div>
<?php
}
?>