phpmania1 Posted January 26, 2009 Share Posted January 26, 2009 So. Banner, Position: absolute. Free hoster. Google ad comes and goes. When google ad comes, banner good. when google ad goes, banner in the middle of the freakin page. Any pointers? diyrealestate.leadhoster.com/open_realty/index.php Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 26, 2009 Share Posted January 26, 2009 add this: #header_right { position: relative; } then adjust the positioning of your header accordingly Quote Link to comment Share on other sites More sharing options...
phpmania1 Posted January 26, 2009 Author Share Posted January 26, 2009 alright but, #mrbanner { position:relative; top:1px; left:180px; } check the site again.. it won't go any higher? Quote Link to comment Share on other sites More sharing options...
phpmania1 Posted January 26, 2009 Author Share Posted January 26, 2009 heh. didn't know you go into negatives Thanks, almost solved... just have to reload until i don't get hte banner! Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 26, 2009 Share Posted January 26, 2009 mrbanner should be position absolute Quote Link to comment Share on other sites More sharing options...
phpmania1 Posted January 26, 2009 Author Share Posted January 26, 2009 add this: #header_right { position: relative; } then adjust the positioning of your header accordingly mrbanner should be position absolute now im confused? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 26, 2009 Share Posted January 26, 2009 position absolute allows you to move an element (with top/bottom and left/right) in relation to it's closest parent with position relative. if no parent has that, it does it from the body. now, you don't want to be ##px left and ##px top from the BODY, you want it from the direct parent. that way if the ad is there, and it moves your content down, it won't throw things off. /* Set the banner's parent to have relative position */ #header_right { position: relative; } /* Position the banner absolute */ #mrbanner { position: absolute; top: 1px; left: 180px; } ...adjust top & left to your liking Quote Link to comment Share on other sites More sharing options...
phpmania1 Posted January 26, 2009 Author Share Posted January 26, 2009 and header_right? should that not be part of mrbanner since there is nothing in my html that refers to banner_right? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 26, 2009 Share Posted January 26, 2009 i don't understand what you mean...and i loaded up the site again to look, and the logo isn't there any more Quote Link to comment Share on other sites More sharing options...
phpmania1 Posted January 26, 2009 Author Share Posted January 26, 2009 i took the banner off, im trying new ones. this is what i mean, #mrbanner { position:absolute; top:1px; bottom:1px; } header_right****** is not in my code, and index.html does not call for it there is no * header_right so do i add it into mr banner? #mrbanner { position:relative; position:absolute; top:1px; bottom:1px; } Or would i go to my index.html and call <div id mrbanner>? Quote Link to comment Share on other sites More sharing options...
rhodesa Posted January 26, 2009 Share Posted January 26, 2009 the relative needs to go on one of the DIVs that is a parent of the logo...until your HTML is final, it's hard to say Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.