Click to See Complete Forum and Search --> : CSS Positioning-Logo/ banner aligning


ckani
12-14-2006, 02:42 PM
I have a problem aligning ads or images after my logo. I have looked through lots of forums but can't seem to get the answer.
What I want is to place ads next to the logo (to the right), but they end up under the logo.
You can find this problem here: www.thekani.com/index.html (http://www.thekani.com/index.html)

Please help anyone!!!!

mrmazur
12-14-2006, 03:18 PM
Have you tried to float the ad left? Give that a shot and let me know if that fixes your problem.

ckani
12-14-2006, 03:32 PM
Yes I have tried floating, but it won't work. What I'm trying now is relative & absolute positioning, but then the banner overlaps & covers the logo.

Any more suggestions welcome.

Thanks

sticks464
12-14-2006, 05:35 PM
Change your style sheet to this:
ul#nav{clear:left;margin:0;padding:0;}

ul#nav li{list-style-type:none;margin:0;padding:0;}

Right now it is ul#nav,ul#nav li{list-style-type:none;margin:0;padding:0;}
It works in IE and FF.

Validate the html also, there are lots of errors.

ckani
12-14-2006, 05:52 PM
Thanks for your response. I got it to work by editting div#header & div#ad in the CSS file:

div#header{width:100%;overflow:hidden;background: #DAE6FE; position: relative;}
div#header h1, div#menu{width:820px;margin:0 auto;text-align:left}
div#menu img{margin:0 ;padding:0 ;border:0px none; }
div#menu a{text-decoration:none}
div#logo{width:125px;text-align:left}
div#ad { height: 70px; width: 665px; position: absolute; right: 0px; top: 2px;}
div#header h1{padding: 30px 0 ;color: #FFF}

Am gonna validate it now. Should I still change ul#nav, or should I just leave it cause its working?

Thanks again

sticks464
12-14-2006, 06:13 PM
Did you check it in both browsers? If it works fine in both browsers, leave it.

Ascendancy
12-15-2006, 08:10 PM
Yea it looks good to me. The position: absolute helps out a lot, but the only problem is when you have some people with 800x600 browsers and some with 1024x768, etc.