...

View Full Version : Column alignment?



michael180
08-09-2007, 06:49 PM
REF: http://moderntimes.com/tmp/

I have two questions regarding the above page.

1. How do I get the 1px border on the right side of the center column to extend to the bottom of the page?

2. And how do I get the top of the Search box to align with the text in the adjoining column?

Thanks,
Michael

Jutlander
08-09-2007, 08:43 PM
Have a look at this 3 column layout. It does what you need. Try and study the code, our id names are almost the same, so shouldn't be too hard.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>3 columns with header &amp; footer layout</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
body {
margin-bottom: 40px;
}
#wrapper {
margin: 0 auto;
margin-top: 15px;
width: 900px;
border: 1px solid #777;
color: #444;
background: #fff;
}
#header {
border-bottom: 1px solid #777;
padding: 1em;
background: #ddd;
}
#left {
float: left;
width: 170px;
padding: 1em;
}
#right {
float: right;
width: 170px;
padding: 1em;
}
#content {
margin-left: 200px;
margin-right: 200px;
border-left: 1px solid #777;
border-right: 1px solid #777;
padding: 15px;
}
#content p {
margin-bottom: 20px;
}
#content h2 {
margin: 0 0 .5em 0;
}
#footer {
clear: both;
border-top: 1px solid #777;
text-align: center;
padding: 10px;
background: #ddd;
}
</style>
</head>

<body>

<div id="wrapper">

<div id="header"><h1>Header</h1></div>

<div id="left">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
</div>

<div id="right">
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>
</div>

<div id="content">

<h2>Content header</h2>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.</p>

</div>

<div id="footer"><p>Lorem ipsum dolor sit amet</p></div>

</div>

</body>
</html>

michael180
08-09-2007, 09:10 PM
Hi Jutlander,

Yes that works. I should have seen the "right" border! It all makes sense. Extremely good response!

I don't quit know what you mean by our id names?

Jutland, great name, great battle!

Again, thanks much,
Michael Mills :thumbsup:

Jutlander
08-09-2007, 09:14 PM
Hi Jutlander,

I don't quit know what you mean by our id names?

I meant that you have a #wrapper, just as I do - just to take one example.


Jutland, great name, great battle!

Hell, I thought when Scotland can have highlanders, then we can have jutlanders. ;)

michael180
08-09-2007, 09:53 PM
I see, thanks, again.
MM



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum