www.webdeveloper.com
Results 1 to 4 of 4

Thread: Nav Jumping

  1. #1
    Join Date
    Jun 2014
    Posts
    3

    Nav Jumping

    Hi to all the readers of this post

    I'm currently building a site and i keep encountering this issue of my nav popping but if i refresh the browser enough times it puts itself right
    im expecting this to be css related but not a clue what

    what is this likely to be?

    Heres the HTML:
    Code:
    <!DOCTYPE html>
    <head>
    
    <script src="js/jquery-1.11.0.min.js"></script>
    	<script src="js/lightbox.min.js"></script>
    	<link href="css/lightbox.css" rel="stylesheet" />
    	<link href="css/subgallery.css" rel="stylesheet" />
    	
    <title>
    	carrollcreative.co.uk
    </title>
    
    </head>	
    <header>
    <a href="test.html"><img id="logo" src="img/CarrollCreative.png"></a>
    				<a href="#" target="3"><img id="icon1" class="shrink" src="img/Insta Icon.png">
    				<a href="#" target="2"><img id="icon1" class="shrink" src="img/Twitter Icon.png"></a>
    				<a href="#" target="1"><img id="icon1" class="shrink" src="img/Facebook Icon.png"></a>
    		<ul class="nav">
    				<stron><li><a href="test.html">Home</a></li></stron>
    				<stron><li><a href="about.html">About Us</a></li></stron>
    				<stron><li><a href="pricing.html">Pricing</a></li></stron>
    				<stron><li><a href="contact.html">Contact Us</a></li></stron>
    		</ul class="nav">	
    </header>
    <body>	
    <section>
    	<a href="img/image-1.jpg" data-lightbox="hunt" data-title="Keith McCall"><img src="img/image-1.jpg"></a>
    	<a href="img/image-1.jpg" data-lightbox="hunt" data-title="Keith McCall"><img src="img/image-1.jpg"></a>
    	<a href="img/image-1.jpg" data-lightbox="hunt" data-title="Keith McCall"><img src="img/image-1.jpg"></a>
    	<a href="img/image-1.jpg" data-lightbox="hunt" data-title="Keith McCall"><img src="img/image-1.jpg"></a><a href="img/image-1.jpg" data-lightbox="image-1" data-title="Keith McCall"><img src="img/image-1.jpg"></a>
    	<a href="img/image-1.jpg" data-lightbox="hunt" data-title="Keith McCall"><img src="img/image-1.jpg"></a>	
    </section>
    </body>
    	
    <footer>
    		&copy;Carroll Creative 2014
      </footer>
    </html>
    Heres the CSS
    Code:
    header{
    font-family:beatnik sf;
    background-color:#1a1a1a;
    height:70px;
    width:100%;
    margin-bottom:px;
    padding-top:20px;
    border:5px solid red;
    }
    
    #logo{
    height:50px;
    width:450px;
    margin-bottom:50px;
    margin-left:30px;
    margin-top:10px;
    }
    
    nav{
    float:right;
    }
    
    header ul{
    list-style:none;
    float:right;
    text-align:right;
    }
    
    header li{
    display:inline;
    padding-right:30px;
    decoration:none;
    }
    
    header a{
    text-decoration:none;
    color:white;
    }
    
    /Social media icon setting for later.
    
    .iconcontainer{
    width:120px;
    float:right;
    height:40px;
    }
    
    
    #icon1{
    
    float:right;
    height:30px;
    padding:px;
    margin-right:20px;
    display:inline;
    }
    
    .bounce:hover{
      -webkit-animation-name: bounce;
      animation-name: bounce;
    }
    
    body{
    background-color:#1a1a1a;
    height:500px;
    width:100%;
    overflow-x: hidden;
    margin:0;
    padding:0;
    }
    
    section{
    padding:0px;
    margin-top:0px;
    background-color:whit;
    height:700px;
    width:100%;
    text-align:center;
    border:5px solid red;
    position:relative;
    top:20px;
    }
    
    section p{
    font-family:Arial;
    }
    
    section ul{
    list-style:none;
    }
    
    section a{
    text-decoration:none;
    font-family: 'Roboto', sans-serif;
    font-size:30px;
    color:black;
    }
    
    .index-post1{
    height:500px;
    width:100%;
    margin-top:0px;
    display:block;
    position:relative;
    }
    
    .index-post1 img{
    position:relative;
    top:90px;
    padding-right:5px;
    height:300px;
    width:300px;
    display:inline;
    }
    
    span{
    margin-right:0px;
    margin-left:0;
    width:10px;
    }
    
    .shrink {
      display: inline-block;
      -webkit-transition-duration: 0.3s;
      transition-duration: 0.3s;
      -webkit-transition-property: transform;
      transition-property: transform;
      -webkit-transform: translateZ(0);
      transform: translateZ(0);
      box-shadow: 0 0 1px rgba(0, 0, 0, 0);
    }
    .shrink:hover, .shrink:focus, .shrink:active {
      -webkit-transform: scale(0.9);
      transform: scale(0.9);
    }
    
    div{
    height:500px;
    width:100%;
    color:black;
    font-weight:bold;
    }
    
    .container{
    height:70px;
    width:500px;
    color:black;
    font-weight:bold;
    position:relative;
    bottom:15px; 
    }
    
    footer{
    font-family: beatnik sf, 'Roboto', sans-serif;
    color:white;
    background-color:#1a1a1a;
    height:55px;
    width:100%;
    margin-top:px;
    text-align:center;
    padding-top:35px;
    position:relative;
    border:5px solid red;
    }
    
    footer a{
    font-family: 'Roboto', sans-serif;
    color:white;
    height:50px;
    }
    
    /* Form Starts */
    
    label {
        display:block;
        margin-top:20px;
        letter-spacing:2px;
    	font-family: 'Roboto', sans-serif;
    }
    
    
    form {
        margin:0 auto;
        width:459px;
    	margin-top:90px;
    }
    
    /* Style the text boxes */
    input, textarea {
    	width:439px;
    	height:27px;
    	background:#FFFFFF;
    	border:1px solid #dedede;
    	padding:10px;
    	margin-top:3px;
    	font-size:0.9em;
    	color:#3a3a3a;	
    	-moz-border-radius:5px;
        -webkit-border-radius:5px;
        border-radius:5px;
    }
    
    input:focus, textarea:focus {
        border:1px solid #97d6eb;
    }
    
    #submit{
    height:auto;
    width:100px;
    background-color:gray;
        border:none;
    	  cursor:pointer;
    	  color:white;
    }
    
    img{
    height:200px;
    padding-right:5px;
    }
    
    /* Form Ends */
    Any solution very much appreciated
    Last edited by jedaisoul; 06-06-2014 at 02:37 PM. Reason: code tags added

  2. #2
    Join Date
    Jun 2014
    Posts
    3
    Here update on this issue:

    This problem does not seem to appear in Internet Explorer or Firefox only Chrome. and this is the only page with Javascript/Jquery Enabled on it.

    Not a clue what this could be.

    Heres is what the jquery is:

    http://lokeshdhakar.com/projects/lightbox2/

    iv tried taking the jquery away from the page and it stops

    and advice greatly appreciated

  3. #3
    Join Date
    Mar 2012
    Posts
    1,402
    Quote Originally Posted by liam22 View Post

    Code:
    <!DOCTYPE html>
    <head>
    
    <title>
    </title>
    
    </head>	
    <header>
    </header>
    <body>	
    <section>
    </section>
    </body>
    	
    <footer>
    </footer>
    </html>
    As I understand it, <body> is optional in HTML5, but if used MUST follow </head>. Similarly </body> must be followed by </html>. I.e. <header> and <footer> must be inside <body> </body> (if used). Also <section> is redundant if there is only one section!

    <stron> I'm not sure that this abbreviation is valid.

    font-family:beatnik sf; AFAIK this should be font-family:"beatnik sf";

    margin-bottom: px; not sure if 0 is optional.

    padding: px; as above.

    background-color:whit; as above.
    Last edited by jedaisoul; 06-06-2014 at 04:26 PM.

  4. #4
    Join Date
    Jun 2014
    Posts
    3
    All of the changes have been made but no improvement. Its really frustrating thankyou for helping me clean the code though i knew most of those problems but im a messy/lazy coder i clean it up once iv finished.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles