PDA

View Full Version : CSS and Banner Placement Question


RichieBoy67
02-24-2007, 01:59 AM
Can someone help me figure out the best way to place banners in my header? I have been trying to add to css and I am having a difficult time. I am not exactly sure what to do. Relative positioning? Absolute??

Can someone please past thier css and header code showing banner placement in the top right corner??


Thanks so much....


Is this right??

<style type="text/css">
<!--
#layer1 {
position:absolute;
width:460px;
height:60px;
z-index:1;
right: 80px;
top: 0px;
}
-->
</style>
<div id="layer1">$bannerads</div>
I can either place this in the CSS or the header template?? Correct??


Is this compliant??? And seo friendly??? It does seem to work with the browsers I have tried at least...

Thanks

Aken
02-24-2007, 03:48 AM
You should place the CSS in your extras area at the very bottom of the CSS editing page. You won't need the <style> tags or <!-- --> tags either.

Then place the HTML for it in your header template.

You may need to edit the CSS for it to work properly with your skin. If what you have doesn't work, try using float: right.

RichieBoy67
02-24-2007, 12:33 PM
Thanks..

Actually I did want to use the float tag but I couldn't get it to work properly.....

Thanks for the tip though -- I didn't think of that...

This seems to work perfectly in the browsers I have tested but my main concern is SEO. Will this have an impact at all on seo and would using a float tag have a lesser impact???

One other thing, I know that you can place css definitions directlly on pages but is there any difference really? I know that you would normally do this if you only wish to change something on one page but is it better to have this placed in the css directly and if so why?

Thanks... don't mind my questions. I am just trying to learn all I can from the powerful minds in here....

Rich

Princeton
02-24-2007, 04:28 PM
What SEO issues are you talking about - banner targeting or indexing of page?

Regarding CSS, you want to place all style definitions on an external page whenever possible.
- this will produce a smaller html page
- css file will be cached by browsers