WordPress.org

Ready to get started?Download WordPress

Forums

Looking for help with menu (4 posts)

  1. lbeav3
    Member
    Posted 6 years ago #

    Hello to anyone who can help and will help...

    I am just trying to create a menu that hovers my header (jpg). I have used this wordpress lesson (http://codex.wordpress.org/Creating_Horizontal_Menus) and it works on the home page, but repositions to the top when I click the "about" section or "uncategorized" section. Also, the home page has the menu positioned differently in different browsers. How can I keep it the same in any browser? Along the same lines...the sidebar doesn't connect all the way in IE.

    What do I do on these issues? Any help would be greatly appreciated. Please keep in mind that this is a new blog, I am a "newbie," and please don't worry about the menu font...just the positioning and different browser issue.

    Here is the url: http://www.beaversbank.com

    Thanks again!

  2. Michael Fields
    Themer
    Posted 6 years ago #

    lbeav3,

    Hi. This does look to be a mess!

    Actually... Your homepage is wrong and your about page is right! Your homepage is rendering in Quirks mode while your about page is rendering in standards compliant mode. This is because (most likely) you have some extra code at the top of your index.php file. The code looks like this:

    <html>
    	<head>
    
    		<title>Beavers Bank - creativity to the max</title>
    		<meta name="Description" content="A place for creative videos/music/artwork/and more">
    		<meta name="Keywords" content="Creative, Videos, Music, Art, photos">
    		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    Delete this. The first thing that should been seen by the browser is the DOCTYPE declaration. After this is fixed on your index, your index file should look the same as your other pages.

    NEXT VALIDATE!!!!!!!!!!!!!!!
    Before seeking help with html/css is is in everyones best interest that you validate your html. I checked with w3c and there's a ton of errors.

    The reason why it is so important to validate your documents is because, once you do, weird positioning errors like this seem to disappear.

    Here's how you can fix your document:

    HOME PAGE
    deleted extra code before DOCTYPE
    enclosed javascript in CDATA section
    added terminating head tag in appriate place
    added starting body tag in appropriate place
    deleted extra terminating body tag at bottom of page
    deleted extra terminating html tag at bottom of page
    added slash to all <br> tags
    deleted this code from an image: align="absmiddle" border="5"
    changed id="navmenu" to class="navmenu" - you should be using a class if the element appears more than once per document - Note: this should be changed in the css file too!

    ABOUT PAGE
    added </head> in appropriate place
    added '<body>` in appropriate place
    added slash to all <br> tags
    removed target="_blank" from an anchor tag
    removed all align, target and border attributes from tags
    enclosed javascript in CDATA section

    now we should have valid code!

    NEXT - Find out whats going on...

    CSS file is invalid too

    change top: 155; left: -75 to: top: 155px; left: -75px
    you MUST use a unit after the numbers 'px', 'em', '%', these will all work.

    That fixed it for me.

    Hope this was helpful,
    -Mike

  3. lbeav3
    Member
    Posted 6 years ago #

    Thanks Mike, that was very helpful. Great explanation and coding help! Thanks for taking the time to help me out.

    Cheers!

  4. Michael Fields
    Themer
    Posted 6 years ago #

    Right on...
    Glad I could help out.
    -Mike

Topic Closed

This topic has been closed to new replies.

About this Topic