Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Website coding help

Featured Replies

u need to add

<div class="clear"></div>

before ur footer div

and in css

.clear{clear:both;}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" media="screen" href="style.css" />
<script language="javascript" type="text/javascript" src="js/superfish.js"></script>
<script language="javascript" type="text/javascript" src="js/hoverintent.js"></script>

<title>Virtual United Air Festival</title>
</head>

<body>
<div id="wrapper">
<div id="header">Logo and slide show here </div>      
<!-- Header End -->
<div id="menu">
   	 <ul class="sf-menu">
                   <li class="current"><a href="/">Home</a></li>
                   <li class="current"><a href="/">About Us</a></li>
                   <li class="current"><a href="/"> 2012</a></li>
                   <li class="current"><a href="/">Gallery</a></li>
                   <li class="current"><a href="/">Applications</a></li>
                   <li class="current"><a href="/">Forum</a></li>
				<li class="current"><a href="/">Contact Us</a></li>                   
     </ul>
       </div>  <!-- Menu End-->
    <div id="container">
       <div id="main">
       	   <h1>Welcome</h1>  
                  <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>  
         <h2>Heading 2 sample</h2>  
                  <p>Some more text</p>

        </div> <!-- Main End-->

        <div id="sidebar">
        	<div class="newsbox"> 
               <h3>News</h3>  
               <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
                <p> </p>
                       </div>   <!-- News End -->
        </div> <!-- Sidebar End -->      
   <div class="clear"></div>
<div>FOOTER</div>

</div>  <!-- Wrapper End-->
</body>
</html>

 

body {
   color: #4D4D4D;
   font-family: Arial;
   font-size: 12.5px;
   font-weight: lighter;
background-color: #FFFFFF;
margin: 0px;
padding:20px;

}

#wrapper {
height: 0 auto;
   margin: 0 auto;
   width: 1024px;
}


#header {
   height: 175px;
   width: 1000px;
}
.clear{clear:both;}

#menu {
   background-color: #4D4D4D;
   border-bottom: 3px solid #B3B3B3;
   border-top: 1px solid #B3B3B3;
   color: #FFFFFF;
   height: 40px;
}
#menu ul {
   list-style-type: none;
   margin-left: auto;
   margin-right: auto;
   text-align: left;
}
#menu ul li {
   display: inline;
   line-height: 40px;
   padding: 0 20px;
   text-decoration: none;
}
#menu a:link {
   color: #FFFFFF;
   text-decoration: none;
}
#menu a:hover {
   color: #AAAAAA !important;
   text-decoration: none;
}
#menu a:visited {
   color: #FFFFFF;
   text-decoration: none;
}
#menu a:active {
   color: #FFFFFF;
   text-decoration: none;
}

.sf-menu, .sf-menu * {
   list-style: none outside none;
   margin: 0;
   padding: 0;
}
.sf-menu {
   line-height: 1;
}
.sf-menu ul {
   position: absolute;
   top: -999em;
   width: 15em;
}
.sf-menu ul li {
   width: 100%;
}
.sf-menu li:hover {
   visibility: inherit;
}
.sf-menu li {
   float: left;
   position: relative;
}
.sf-menu a {
   display: block;
   position: relative;
}
.sf-menu li:hover ul, .sf-menu li.sfHover ul {
   left: 0;
   top: 2.3em;
   z-index: 99;
}
ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul {
   top: -999em;
}
ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul {
   left: 15em;
   top: 0;
}
ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul {
   top: -999em;
}
ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul {
   left: 1em;
   top: 0;
}
.sf-menu {
   float: left;
   margin-bottom: 1em;
}
.sf-menu a {
   display: block;
   padding: 0 0.5em;
   text-decoration: none;
}
.sf-menu a, .sf-menu a:visited {
}
.sf-menu li li a {
   border-right: medium none !important;
}
.sf-menu li {
   background: none repeat scroll 0 0 #4D4D4D;
}
.sf-menu li li {
   background: none repeat scroll 0 0 #4D4D4D;
}
.sf-menu li li li {
   background: none repeat scroll 0 0 #4D4D4D;
}
.sf-menu li:hover, .sf-menu li.sfHover, .sf-menu a:focus, .sf-menu a:hover, .sf-menu a:active {
   outline: 0 none;
}
.sf-menu li li:hover, .sf-menu li li.sfHover, .sf-menu li li a:focus, .sf-menu li li a:hover {
   background: none repeat scroll 0 0 #4D4D4D !important;
}
.sf-menu a.sf-with-ul {
   min-width: 1px;
   padding-right: 1.25em;
}
.sf-sub-indicator {
   display: block;
   height: 10px;
   overflow: hidden;
   position: absolute;
   right: 0.75em;
   text-indent: -999em;
   top: 1.05em;
   width: 10px;
}
a > .sf-sub-indicator {
   background-position: 0 -100px;
   top: 0.8em;
}
a:focus > .sf-sub-indicator, a:hover > .sf-sub-indicator, a:active > .sf-sub-indicator, li:hover > a > .sf-sub-indicator, li.sfHover > a > .sf-sub-indicator {
   background-position: -10px -100px;
}
.sf-menu ul .sf-sub-indicator {
   background-position: -10px 0;
}
.sf-menu ul a > .sf-sub-indicator {
   background-position: 0 0;
}
.sf-menu ul a:focus > .sf-sub-indicator, .sf-menu ul a:hover > .sf-sub-indicator, .sf-menu ul a:active > .sf-sub-indicator, .sf-menu ul li:hover > a > .sf-sub-indicator, .sf-menu ul li.sfHover > a > .sf-sub-indicator {
   background-position: -10px 0;
}
.sf-shadow ul {
   border-bottom-left-radius: 17px;
   border-top-right-radius: 17px;
   padding: 0 8px 9px 0;
}
.sf-shadow ul.sf-shadow-off {
   background: none repeat scroll 0 0 transparent;
}
#container{
width: 1000px;
height: auto;
background: #fff;


}

#main {
float: left;
width:480px;
margin-right: 20px;
margin-right: 20px;
padding-left: 30px;
}

#sidebar {
float: right;
width:400px;
margin-right:40px;
}

.newsbox{
 background: none repeat scroll 0 0 #265183;
     color: #FFFFFF;	

}

Edited by sash_oo7

You can also put

overflow: hidden;

in your css for the main wrapper.

 

Of course if there's anything that pops out of that container, it won't be shown. It's a good solution for most cases and means less redundant HTML in your code. Sometimes it just doesn't cut it though and you do have to use the clear method above.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.