SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    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!
    Convert your dollars into silver coins. www.convert2silver.com

  2. #2
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    6 Thread(s)
    Hi busboy,

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

    Regards,
    Steve
    ictus==""

  3. #3
    SitePoint Guru
    Join Date
    Sep 2004
    Location
    Provo, UT
    Posts
    858
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    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.
    Convert your dollars into silver coins. www.convert2silver.com

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,214
    Mentioned
    457 Post(s)
    Tagged
    8 Thread(s)
    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:

    Code:
    <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.

  5. #5
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,841
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    @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:

    HTML Code:
      <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>
    Last edited by John_Betong; Mar 27, 2012 at 22:29. Reason: included ink to dynamic menu
    Learn how to be ready for The New Move to Discourse

    How to make Make Money Now with a *NEW* look

    Be sure to congratulate Patche on earning Member of the Month for July 2014


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •