Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts

    menu position jumps when put in include file

    Hello-

    I'm really new at this website-writing thing (stifle the groans, please . Anyway, I'm trying to include a standard header, footer, and menu in all the pages. The header and footer display well as .txt includes, but the menu, which displays fine when not included, jumps halfway down the page as a .txt file. It's supposed to be tight up against the header. I have no idea what's going wrong, so any help given would be extremely appreciated.

    Thanks-
    Kate
    Attached Files Attached Files

  • #2
    Regular Coder kosstr12's Avatar
    Join Date
    Apr 2007
    Location
    Woodstock, Georgia
    Posts
    428
    Thanks
    7
    Thanked 5 Times in 5 Posts
    Try
    Code:
    float:left;
    inside the css for the menu

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,741
    Thanks
    22
    Thanked 1,837 Times in 1,821 Posts
    Good morning tangled_slinky,
    That's a lot of hacks in that CSS! Have you really invoked any IE bugs with what little is in your code? I would leave the hacks out until you really find you need one.

    Maybe a better way would be this:
    Code:
    <body>
    
    <div id="Header">
    <!--#include virtual="/includes/header.txt" -->
    </div>
    
    
    <div id="Menu">
        <ul>
            <li><a href="#" class="hmenu">Home</a></li>
            <li><a href="#" class="hmenu">About</a>
        <ul>
            <li><a href="#" class="sub">Hobbs</a></li>
            <li><a href="#" class="sub">Current Officers</a></li>
            <li><a href="#" class="sub">Bio Pages</a></li>
        </ul>
        	<li><a href="#" class="hmenu">Pholeos</a>
        <ul>
            <li><a href="#" class="sub">Current Issue Highlights</a></li>
            <li><a href="#" class="sub">Submission Guidelines</a></li>
        </ul>
            <li><a href="#" class="hmenu">Calendar</a></li>
            <li><a href="#" class="hmenu">Activities</a>
        <ul>
            <li><a href="#" class="sub">Trip Reports</a></li>
            <li><a href="#" class="sub">Open Surveys</a></li>
            <li><a href="#" class="sub">Current Research</a></li>
        </ul>
        </li>
        	<li><a href="#" class="hmenu">Photos</a></li>
        	<li><a href="#" class="hmenu">Caves and Caving</a>
                <ul>
                    <li><a href="#" class="sub">How Caves Form</a></li>
                    <li><a href="#" class="sub">Conservation/Laws</a></li>
                    <li><a href="#" class="sub">What to Bring Caving</a></li>
                </ul>
                    </li>
            <li><a href="#" class="hmenu">Links</a></li>
            <li><a href="#" class="hmenu">Contact Us</a></li>
        </ul>
    <!--end menu--></div>
        <div id="Content">
            <h1>Hello!</h1>
                <p style="text-indent:30px">
                	text text text content text 
                </p>
        <!--end content--></div>
    
    <div id=footer>
    <!--#echo var="Last_Modified" -->
    <!--#include virtual="/includes/footer.txt" -->
    </div>
    </body>
    and the CSS:
    Code:
    body {	
    	font:11px/20px verdana, arial, helvetica, sans-serif;
    	color:#336600;
    	background-color:#FFFFCC;
    	}
    * {
    	margin:0px;
    	padding:0px;
    }
    h1 {
    	margin:0px 0px 15px 0px;
    	font-size:28px;
    	line-height:28px;
    	font-weight:900;
    	color:#999966;
    }
    h2  {
    	font-size:26px;
    	line-height:0px;
    	font-weight:700;
    	color:#999966;
    	margin:0px 0px 15px 15px;
    }
    p {
    	margin:0px 0px 16px0px;
    }
    #Content>p {margin:0px;}
    #Content>p+p {text-indent:30px;}
    a {
    	font-size:15px;
    	text-decoration:none;
    	font-weight:600;
    }
    a:link  {color:#CC3333;}
    a:visited {color:purple;}
    a:hover {background-color:white;}
    a:active {border:solid 1px #CC3333;}
    ul {
    	list-style-type: circle;
    }
    #Header {
    	margin:50px 0px 0px 0px;
    	padding:17px 0px 6px 20px;
    	/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
    	height:30px;
    	font-size:30px;
    	font-weight:heavy;
    	border-style:solid;
    	border-color:black;
    	border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
    	line-height:11px;
    	background-color:#CC9933;
    }
    #Content {
    	margin:0px 230px 50px 10px;
    	padding:10px;
    	background: #66CCFF;
    	}
    #Menu {
    	float:right;
    	padding:10px;
    	background-color:#eee;
    	border:3px dotted #336600;
    	width:150px;
    	}
    .hmenu {
    	font-size:15px;
    	font-weight:heavy;
    	}		
    .sub {font-size:13px;}
    #Footer {
    	margin:50px 0px 10px 0px;
    	padding:17px 0px 6px 20px;
    	/* For IE5/Win's benefit height = [correct height] + [top padding] + [top and bottom border widths] */
    	height:33px; 
    	border-style:solid;
    	border-color:black;
    	border-width:1px 0px; /* top and bottom borders: 1px; left and right borders: 0px */
    	line-height:11px;
    	background-color:#CC9933;
    	}
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #4
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    excavator-

    ha, i know there's a lot of extra stuff in there. it was one of bluerobot's free templates that i tweaked slowly, slowly so it didn't break. thanks for the cleaned up code, i'll try it out.

  • #5
    New to the CF scene
    Join Date
    Jan 2008
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    kosstr12-
    thanks! i'll give it a try, and let you know how it goes later this evening.

    -kate


  •  

    Posting Permissions

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