Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member
    Join Date
    Dec 2016
    Posts
    2
    Member #
    55890

    New to coding....Can't figure out 2 basic things?

    Please see my code below. I have 2 problems I can't figure out. I want my "top" and "banner" class to expand the whole page. I have both widths set to 100% so I'm not sure why it's not working. I also want that bar to be one container...right now it is 2 or 3. Everything I try messes everything else up.

    My second question which really confuses me...My unordered list is backwards. Any clues? Thanks!
    HTML Code:
    <!DOCTYPE html>
    <html>
    	<head>
    		<title>Sup?</title>
    		<style type="text/css">
    
    			* {
    			   margin: 0;
    			   padding: 0;
    			   
    			   }
    
    			#top {
    			   width: 100%;
    			   background-color: black;
    			   height: 48px;
    			
    			   }
    			body {
    			   font-family: georgia;
    			   background-color: #F0F1E7;
    			   
    			   }
    
    			
    
    			.container
    				{
    				width: 960px;
    				height: auto;
    				margin: 0 auto;
    				}
    
    			#logoArea {
    				width: 100px;
    				height: 48px;
    				background-image: url (logo.png);
    				float: left;
    				}
    
    			#navArea {
    				width: 860px;
    				height: 48px;
    				float: right;
    				}
    
    			#nav {
    				list-style: none;
    				margin-top: 3px;
    				}
    			#nav a {
    				color: #17A398;
    				font-family: verdana;
    				text-decoration: none;
    				}
    		
    			#nav li {
    				float: right;
    				margin-left: 20px;
    				padding: 10px;
    				}
    			#nav li:hover {
    				background-color: #F0F1E7;
    				}
    
    			.page {
    				background-color: white;
    				padding: 20px 20px;
    				
    				}
    			#footer {
    				background-color: #534C45;
    				height: 40px;
    				width: 100%;
    				color: white;
    				padding-top: 20px;
    				text-align: right;
    				padding-right: 20px;
    			}
    
    			p {
    				margin-bottom: 20px;
    				
    				}
    
    			h1 {
    				margin-bottom: 10px;
    				color: #A4CECA;
    				font-family: helvetica;
    				}
    
    			h1, p {
    				padding: 0px 80px;
    				}
    
    			.banner img { 
    				width: 100%;
    				 }
    		</style>
    
    	</head>
    	<body>
    		
    		<div id="top">
    			<div class="container">
    				<div id="logoArea"></div>
    				<div id="navArea">
    				<ul id="nav">
    					<li><a href="#">Home</a></li>
    					<li><a href="#">About</a></li>
    					<li><a href="#">US Festivals</a></li>
    					<li><a href="#">Packing List</a></li>
    					<li><a href="#">Tips</a></li>
    					
    				</ul>
    				</div>
    			</div>
    		</div>
    			<div class="banner"><img src="banner.jpeg" alt="Crowd at festival">
    		</div>
    		<div id="mainArea">
    			<div class="container page">
    			<h1>2017 Survival Guide</h1>
    			<p>Content.</p>
    			</div>
    		</div>
    		<div id="footer">
    			<div class="container">FOOTER</div>
    		</div>
    	</body>
    </html>
    Last edited by Ronald Roe; Dec 09th, 2016 at 04:22 AM.

  2.  

  3. #2
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    Your list is backwards because you floated the list items to the right. They will float in order, so they'll show up backwards. Not sure about the width question, because it appears to span the whole width to me.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  4. #3
    Junior Member
    Join Date
    Dec 2016
    Posts
    2
    Member #
    55890
    Quote Originally Posted by Ronald Roe View Post
    Your list is backwards because you floated the list items to the right. They will float in order, so they'll show up backwards. Not sure about the width question, because it appears to span the whole width to me.
    Thank you.

    The banner spans almost the whole page but does not extend as far as the footer does.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com