Where to put the code for my dynamic CSS menu?

Right now I have html code for my CSS dynamic menu inside the <body> tag. However, now Google sees, “Home, Login, Contact, About” as the first sentence on my webpage. Can someone suggest a way that I can put the menu code somewhere else? Can it technically go before the <body> tag?

Thanks!

Hi busboy,

Sure put it in the ‘<head></head>’ tags within ‘<style> /your styles here/ </style>’ tags.

Regards,
Steve

Yes, but the code that makes my CSS menu work consists of html tags like <ul> and <li>. Are you saying I can put this inside a <style> tag and call it good? Please clarify.

Thanks.

If you are talking about your actual HTML menu, then no, it must go between the <body> tags. It sounds like you haven’t set up a meta description in your <head>, though, which is where Google first looks for a description of your site (that goes under the main search link). E.g. in the <head> of your page, you should have something like this:

<meta content="Your preferred description of your super-duper whiz-bang site goes here." name="description">

It may take a while for Goggle to update its records, though, so be patient. It may take a few weeks to a month, depending on how often the bot drops by for a pinch and a poke.

@busboy

Right now I have html code for my CSS dynamic menu inside the <body> tag. However, now Google sees, “Home, Login, Contact, About” as the first sentence on my webpage. Can someone suggest a way that I can put the menu code somewhere else? Can it technically go before the <body> tag?

I have a header menu which contains no SEO Brownie Points so the script is called from the bottom of the page.
Special note: Essential to have position: relative and position:absolute;

Try this:



  <div id='outer' style='position:relative; width:888px; margin:1em auto'>

     <div 'id='content' style='margin-top: 5.5em'>

         ... Good SEO Brownie Point Blurb goes here...
         ... and here...
         ... and here...
     </div>

     <div 'id='top_menu' style='position:absolute; top:0; left:0'>
           <?php /* http://www.sitepoint.com/forums/showthread.php?842752-How-to-adjust-color-of-Active-Page-in-CSS&p=5092245#post5092245 */ ?>
           <?php include 'top_menu.php'; ?>
     </div>

  </div><?php /* outer */ ?>

</body>
</html>