basically what i want to do is add a navigation bar to the top 27 pixels of my website. the nav bar is called with a JS function and works all by itself. however, sometimes when i add it to certains sites..the CSS of the site will mess with the nav bar css. what i want to do is display the nav bar in the top 27 pixels...and then start the rest of the site directly below those 27 pixels. i dont want the nav bar to interact with the site in any way. how do i do this?
something like this may work, but its hard to tell as you didnt post any code. <div id="menubar" style="height:27px;clear:both;text-align:center;"> <!-- menu script here --> </div> Code (markup):
Try this: <body style=" margin: 50px 5px 5px 5px;"> <div id="menu" style="position: absolute; top: 27px; height: 20px; left: 6px;"> Menu code </div> If you want menu height to be more, just increase 50px in body margin as well otherwise it'll overlap. Try this: <body style=" margin: 60px 5px 5px 5px;"> <div id="menu" style="position: absolute; top: 27px; height: 30px; left: 6px;"> Menu code </div> regards
thanks for this. i tried it and it still doesnt really work well. the site i am trying to install the bar on is barackobamajokes.com here is the code for the bar surrounded by the code you gave me: <body style=" margin: 27px 0px 0px 0px;"> <div id="menu" style="position: absolute; top: 27px; height: 20px; left: 6px;"> <script language="javascript" type="text/javascript"> <!-- var nlSiteName = 'Barack Obama Jokes'; var nlSiteURL = 'http://www.NationalLampoon.com'; var nlWidth = '100%'; //set by %(percentage) or px(pixels) var nlMarginLeft = '0px'; //set by px(pixels) only var nlMarginRight = '0px'; //set by px(pixels) only var nlVertical = 'humor'; var nlTextColor = 'FFFFFF'; //color of text in bar --> </script> <script src="http://www.nationallampoon.com/nlhat/nlbar.js" type="text/javascript"></script> </div> Code (markup): I put this directly before the <body> tag. I left the bar up (not working properly) so you can see what i mean. thanks! PS.... the bar should look like it does on nationallampoon.com