April 17, 201313 yr LOL am I the only one? I'm mystified with the positioning my page. A helpful member on here helped me get my nav bar set up, which was massively appreciated. I've just started to try to put some content on my page, and I'm stumped! http://www.concretestairslondon.co.uk My basic css slideshow has covered my header and paragraph. <!DOCTYPE HTML> <html> <head> <meta name="description" content="concrete stairs"> <meta name="keywords" content="concrete stairs, formwork, reinforced concrete stairs"> <meta name="author" content="Precise Formwork Ltd"> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="css/large.css"> <!--Start Slideshow--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <!--End Slideshow--> <!-- Start Social Buttons Scripts--> <script type="text/javascript">var switchTo5x=false;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher: "d26c0bea-9e21-43bf-a3da-fe1e69a0bae6", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script> <!-- End Social Buttons Scripts--> </head> <body> <div id="title">concrete stairs london</div> <div id="social"> <span class='st_sharethis_large' displayText='ShareThis'></span> <span class='st_facebook_large' displayText='Facebook'></span> <span class='st_twitter_large' displayText='Tweet'></span> <span class='st_linkedin_large' displayText='LinkedIn'></span> <span class='st_googleplus_large' displayText='Google +'></span> <span class='st_plusone_large' displayText='Google +1'></span> <span class='st_email_large' displayText='Email'></span> <span class='st_fblike_large' displayText='Facebook Like'></span> <span class='st_fbsub_large' displayText='Facebook Subscribe' st_username='Precise Formwork'></span> <span class='st_twitterfollow_large' displayText='Twitter Follow' st_username='Precise Formwork Ltd'></span> <span class='st_youtube_large' displayText='Youtube Subscribe' st_username='preciseformwork'></span> </div> <?php include 'navbar.php'; ?> <div id="content"> <!--Start Slideshow Markup--> <div id="slideshow"> <img src="images/96hsk/main/96hsk-1.jpg" /> <img src="images/96hsk/main/96hsk-2.jpg" /> <img src="images/96hsk/main/96hsk-3.jpg" /> </div> <script> $(function () { // Simplest jQuery slideshow by Jonathan Snook $('#slideshow img:gt(0)').hide(); setInterval(function () { $('#slideshow :first-child').fadeOut(1000) .next('img').fadeIn(1000).end().appendTo('#slideshow'); }, 4000); }); </script> <!--End Slideshow--> <div class="content2"> <h1>About Us</h1> <p>Concrete Stairs London is a specialist department of Precise Formwork Ltd that specialises only in reinforced concrete staircases.</p> <h2>Click on concrete stairs to see previous projects</h2> </div> </div> </body> </html> /* CSS Document */ body { font-family: verdana; padding: 50px; } body, html, ul { margin:0; padding:0; list-style:none;} #content { width: 100%; clear: both; } h1 { font-size: 1.5em; } h2 { font-size: 1em; } .content2 { clear: both; } .thumbs img{ float: left: width: 400px; height: 200px; display: block; } /* Navbar Formatting -------------------------------------------------*/ /* HIDE SUB-MENU AND SUB-SUB MENU */ #navbar { font-size: 2em; } #navbar ul, #navbar ul li ul li { display:none; } /* GENERAL LIST STYLES */ #navbar li { background:#1A1A1A; /* BLACK LIST BACKGROUND */ text-align:center; border-bottom:1px white solid; /* ADD BORDER UNDERNEATH EACH LIST ITEM */ } #navbar li a { text-decoration:none; /* REMOVE UNDERLINE FROM LINKS */ display:block; color:white; /* TEXT COLOR */ padding:5px 0; /* ADD SOME SPACE TOP AND BOTTOM OF LI ITEMS */ } /* SUB LIST STYLES */ #navbar ul li a { color:black; background: #eee; /* LIGHT GREY */ padding:5px 0; } /* REMOVE BORDER FROM LAST SUB-LIST ELEMENT, <li class="last">... */ #navbar ul li.last { border-bottom:none; } /* SHOW SUB-MENU WHEN ABOUT IS HOVERED */ #navbar li:hover ul { display:block; } /* SHOW SUB-SUB MENU WHEN 'This will show another sub-menu' is hovered */ #navbar li ul li:hover ul li { display:block; } /* SUB-SUB MENU STYLE e.g. sub menu of Complex Stairs */ #navbar li ul li ul li a { background:lightblue; } /* HOVER OF ABOVE */ #navbar li ul li ul li a:hover { background: #eeeeee; } /* MEDIA QUERY TO CHANGE NAV WHEN SCREEN GOES ABOVE 480px. REDUCE WINDOW SIZE TO SEE NAV CHANGE */ @media all and (min-width: 480px) { /* SHOW NAV ACROSS FULL WIDTH OF SCREEN, GIVE 25% WIDTH TO EACH LIST ITEM (THERE's 4 IN TOTAL, SO DIVIDE 100% BY NUMBER OF LIST ITEMS */ #navbar li { width:25%; float:left; } /* TRADITIONAL STAIRS AND COMPLEX STAIRS */ #navbar li ul li { position:relative; width:100%; } /* SUB LEVEL OF TRADITIONAL STAIRS AND COMPLEX STAIRS */ #navbar li ul li ul { position:absolute; left:100%; width:100%; top:0; } } /* End Navbar formatting --------------------------------*/ /* Start Social Formatting --------------------------------*/ #social .st_youtube_large { padding:0; } #social .st_youtube_large a { offsetTop: '150'; } /* End Social Formatting --------------------------------*/ #title { text-align: center; text-family: "Tahoma", "Lucidia Sans", "Verdana"; font-size: 3em; } /* Start Slideshow Formatting */ #slideshow { width: 100%; position: relative; } img { top: 0; left: 0; width: 100%; max-width: 3000px; height: auto; position: absolute; } /* End Slideshow Formatting */ And on my second page http://www.concretestairslondon.co.uk/17bedf.php (only done two so far lol) the image has jumped over my nav bar and the first thing on the page. I put an inline style on it just to temporarily see what it's like with 400px by 200px as I'm gonna put a few thumbnails on the page. Then there'll be fancybox responsive lightbox. The slideshow has an img overwrite so I put another class thumbs on my image, hoping it would override and float: left. But it's so weird. The width's aren't even coming up correctly. I'm thinking of proceeding and just writing all my content out and then hiring a pro to tweak, but I'm concerned that the markup could all be redundant? <!DOCTYPE HTML> <html> <head> <meta name="description" content="concrete staircases"> <meta name="keywords" content="reinforced concrete stairs - covent garden - london, formwork, reinforced concrete stairs"> <meta name="author" content="Precise Formwork Ltd"> <meta charset="UTF-8"> <title>concrete </title> <link rel="stylesheet" type="text/css" href="css/large.css"> <!--Start Slideshow--> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <!--End Slideshow--> <!-- Start Social Buttons Scripts--> <script type="text/javascript">var switchTo5x=false;</script> <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script> <script type="text/javascript">stLight.options({publisher: "d26c0bea-9e21-43bf-a3da-fe1e69a0bae6", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script> <!-- End Social Buttons Scripts--> </head> <body> <div id="title">concrete stairs london</div> <div id="social"> <span class='st_sharethis_large' displayText='ShareThis'></span> <span class='st_facebook_large' displayText='Facebook'></span> <span class='st_twitter_large' displayText='Tweet'></span> <span class='st_linkedin_large' displayText='LinkedIn'></span> <span class='st_googleplus_large' displayText='Google +'></span> <span class='st_plusone_large' displayText='Google +1'></span> <span class='st_email_large' displayText='Email'></span> <span class='st_fblike_large' displayText='Facebook Like'></span> <span class='st_fbsub_large' displayText='Facebook Subscribe' st_username='Precise Formwork'></span> <span class='st_twitterfollow_large' displayText='Twitter Follow' st_username='Precise Formwork Ltd'></span> <span class='st_youtube_large' displayText='Youtube Subscribe' st_username='preciseformwork'></span> </div> <?php include 'navbar.php'; ?> <div id="content"> <!--Start Slideshow Markup--> <!--End Slideshow--> <h1>Reinforced Concrete Stairs</h1> <p>Four staircases in the heart of London (Covent Garden). The stairs were fabricated in-situ (on site) and no finishes were installed on the steps themselves.</br>Marble was inserted on the landings to give a contrast to the finished product.</p> <h2>Click on concrete stairs to see previous projects</h2> <div class="content2"> <img class ="thumbs" src="images/96hsk/main/96hsk-1.jpg" alt="stairs" height="200px" width="400px"/> </div> </div> </body> </html> I don't expect you guys to solve this for me, just included the code to see if I'm a web designing liability and steer well clear? Regards
April 17, 201313 yr What is wrong is: Your images in div #sldeshow are absolutely positioned, therefore your div #slideshow doesn't extend and practically has a height of 0px. So the div .content2 is behind the images. Give the div#slideshow a fixed height that is more than the height of your images and the div.content2 will appear below. You are looking for a responsive slideshow, aren't you? It will be best to use a more complex one than the one you are using now, as the above issues will be taken care of. Here is one I like and it's relatively easy to implement: http://tympanus.net/codrops/2011/11/21/elastic-image-slideshow-with-thumbnail-preview/ and demo here: http://tympanus.net/Tutorials/ElasticSlideshow/ You can play with the css to adjust it to your needs. Hope that helps
April 18, 201313 yr Author Thanks Teodora, greatly appreciated. I was trying to go for a completely responsive design, if I put a fixed height in on the div slideshow I'm concerned that the site will not be responsive, and the content will not flow. I would say to hell with it and start entering content into my page content and hire a pro to sort this stuff out for me, but http://www.concretestairslondon.co.uk/17bedf.php the image isn't even going into the page content. I'm going to try your suggested responsive slideshow (thanks for that), and I'm hoping that when I do that, and try to enter my image onto the 17bedf page, the image will behave normally (I hope lol). Many thanks for your advice.
Create an account or sign in to comment