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.

CSS / HTML Positioning Help

Featured Replies

hiya guys, i am trying to set up a simple page layout, i think from the files its clear what im trying to achieve, i want a header div then nav bar then a links on the left and content on the right with a simple footer at the bottom, i cannot seem to get the header to stay at the bottom :S also i would like to know how to make it so that when the content div fills with information it will expand with the hole page if that makes senes ? so i can put as much info as i want in it.

 

thanks for any help :D

Darren Marshall - Portfolio - Copy.zip

  • Author

have looked but nothing on there :S

Everything should be inside your header/content/footer divs.

 

Header

--navBar

 

Content

--pagecontent (right box)

--links (left box)

 

Footer

--Anything

 

Also remove the "align=left" from everything. Everything will go to 800px if you don't give it a width so remove all of those.

 

<div class="wrapper">

<div class="header">

	<div class="logo_or_whatever">Header</div>

	<div class="navBar">
		<ul>
			<li>Nav1</li>
			<li>Nav2</li>
		</ul>
	</div> <!--/navBar -->

</div> <!-- /header -->

<div class="content clearfix">

	<div class="pagecontent">Page Content</div>

	<div class="links">Links.</div>

</div> <!-- /content -->

<div class="footer">
	Footer
</div> <!-- /footer -->

</div> <!-- /wrapper -->

 

@charset "utf-8";
/* CSS Document */

.wrapper{
width:800px;
margin:auto; /* centers the "wrapper" div */
}

.header{
background-color:#CCCCCC;
}

.navBar{
background-color:#FF00FF;
}

.links{
width:190px;
height:300px;
float:left;
background-color:#CCCCCC;
}

.content{
margin-top:40px;
}

.pagecontent {
float:right;
width:570px;
height:300px;
background-color:#999999;
}

.footer{
background-color:#FF00FF;
}

/* CLEARFIX - http://www.positioniseverything.net/easyclearing.html */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}


.clearfix:after {
clear: both;
content: ' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0;
}

.clearfix {
display: inline-block;
}

* html .clearfix {
height: 1%;
}

.clearfix {
display: block;
}

  • Author

Everything should be inside your header/content/footer divs.

 

Header

--navBar

 

Content

--pagecontent (right box)

--links (left box)

 

Footer

--Anything

 

Also remove the "align=left" from everything. Everything will go to 800px if you don't give it a width so remove all of those.

 

<div class="wrapper">

<div class="header">

	<div class="logo_or_whatever">Header</div>

	<div class="navBar">
		<ul>
			<li>Nav1</li>
			<li>Nav2</li>
		</ul>
	</div> <!--/navBar -->

</div> <!-- /header -->

<div class="content clearfix">

	<div class="pagecontent">Page Content</div>

	<div class="links">Links.</div>

</div> <!-- /content -->

<div class="footer">
	Footer
</div> <!-- /footer -->

</div> <!-- /wrapper -->

 

@charset "utf-8";
/* CSS Document */

.wrapper{
width:800px;
margin:auto; /* centers the "wrapper" div */
}

.header{
background-color:#CCCCCC;
}

.navBar{
background-color:#FF00FF;
}

.links{
width:190px;
height:300px;
float:left;
background-color:#CCCCCC;
}

.content{
margin-top:40px;
}

.pagecontent {
float:right;
width:570px;
height:300px;
background-color:#999999;
}

.footer{
background-color:#FF00FF;
}

/* CLEARFIX - http://www.positioniseverything.net/easyclearing.html */
.clear {
clear: both;
display: block;
overflow: hidden;
visibility: hidden;
width: 0;
height: 0;
}


.clearfix:after {
clear: both;
content: ' ';
display: block;
font-size: 0;
line-height: 0;
visibility: hidden;
width: 0;
height: 0;
}

.clearfix {
display: inline-block;
}

* html .clearfix {
height: 1%;
}

.clearfix {
display: block;
}

 

Perfect thanks alot :D

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.