Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Floating Colums Forced Under

Status
Not open for further replies.

Petrolhead

Technical User
Mar 13, 2009
27
Hi there,

I am having an issue where I am trying to align 3 columns.

The central column is being displayed to the left on the top of the page, and the left and right columns are being forced under.

Could anyone help me out, I'm having real trouble getting this one to work.


Excerpt from CSS below.

Code:
#wrapper{
  width: 1000px;
  background: #FFF8DC;
  border: 0px solid;
  text-align: left;
  margin-left: auto;
  margin-right: auto;
  padding: 0;

}

#content{
  float: center;
  padding-top: 20px;
  padding-left: 0px;
  padding-right: 0px;
  background: #FFF8DC;
  text-align: left;
  margin: 0;
  width: 300px;
}

#sidebar {
	background: #FFF8DC;
	float: left;
	width: 200px;
	padding-top: 20px;
	padding-left: 10px;
	padding-right: 10px;
	font: normal normal 70%/125% 'Lucida Grande', Verdana, arial, sans-serif;
	color: black;
	border: 0;
	letter-spacing: 0;
	margin: 0;
}

#linksbar {
	background: #FFF8DC;
	float: right;
	width: 200px;
	padding-top: 20px;
	padding-left: 10px;
	padding-right: 10px;
	font: normal normal 70%/125% 'Lucida Grande', Verdana, arial, sans-serif;
	color: black;
	border: 0;
	letter-spacing: 0;
	margin: 0;
}

#clearer {
	clear: both;
	height: 0;
}
 
I have added float left and also tried float right.

This does line the 3 columns up but forces my content column to either the far left or the right,not the middle.
 
Hi Dan,

That got it,

Thanks for the help. Don't know how you guys get so good at this, doing this website has been such a steep learning curve for me.

Many thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top