View Full Version : Creating a DIV to display 728x90 ad
scotthutch
17th July 09, 08:38 PM
i am finishing up a theme in wordpress which you can see http://itaughtchucknorris.com
i am running into problems getting a div to display up and to the left of the WAMG logo.
can anyone help with this? I really suck at CSS which is my main problem.
meesa
17th July 09, 08:44 PM
What DIV are you having the problem with?
scotthutch
17th July 09, 08:46 PM
well I am trying to create a div that will be right aligned and will house a 728x90 adsense banner. I also want it to reside to the top and I just dont know how to create this.
Rayzur
17th July 09, 08:55 PM
Hi,
Just create a new selector in your css, call it header-ad. Then float it left and give it dimensions.
#header {
width: 950px;
float: right;
height: 185px;
background-color: #ffffff;
background-image: url(http://www.itaughtchucknorris.com/logo.jpg);
background-repeat: no-repeat;
}
#header-ad {
float:left;
width:780px;
height:90px;
background:red;
}
Then nest that div within the header in the html , easy as pie!
<div id="header">
<div id="header-ad">Header Ads Here</div>
<a href="http://itaughtchucknorris.com/"><img src="" border="0"></a>
<!--This is your company's logo-->
</div>
scotthutch
17th July 09, 11:31 PM
that worked like magic! you are the man! is there anyway to get it grounded, so it sits next to the logo instead of above?
Rayzur
18th July 09, 12:27 AM
Well it looks like you changed the header height to force your ad div down since I looked at your page previously. You could have set a top margin on it or used absolute positioning (AP) to position it to the bottom of the header div. Using the AP method requires some additional rules though.
If you want your header taller with the ads at the bottom just post back.
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.