Jump to content

My layout is broken and I can't find the solution


spike-spiegel

Recommended Posts

It'll be down to the margin's you're setting. You've structured the page in a hard-to-follow way. Really what you should be doing is setting 1 containing element, 1 float left + width, 1 float right + width. 

 

Something along the lines of this -

.wrapper {
	display: block;
	width: 1030px;	
}

	.wrapper:after {
		clear: both;
		content: ".";
		display: block;
		height: 1px;
		visibility: hidden;	
	}

.left {
	display: block;
	float: left;
	width: 710px;	
}

.right {
	display: block;
	float: right;
	width: 310px;	
}

<div class="wrapper">
	<div class="left">Left content</div>
	<div class="right">Right content</div>
</div>
Link to comment
Share on other sites

No, the example has both. 

 

Looking through your code you have lots of different container elements doing similar things, then you use margins to push the columns into place. This method is causing the right column to act in a way you don't expect. The code above is a simple version of what you're trying to do.

Link to comment
Share on other sites

No, the example has both. 

 

Looking through your code you have lots of different container elements doing similar things, then you use margins to push the columns into place. This method is causing the right column to act in a way you don't expect. The code above is a simple version of what you're trying to do.

This is a template, I didn't create it.....

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.