I'm trying to create a two column CSS layout framework.
The two columns must be vertically and horizontal centred dependant on screen resolution, with column 2 horizontally fluid. Also, column 2 must be scrollable.
Any help or ideas welcome.
Thank you,
Barton.
Declan1991
04-08-2008, 02:30 PM
You're a bit vague. Do you want them both with space to either side etc. A graphic, maybe, of what you would like?
WebJoel
04-08-2008, 02:40 PM
"...trying to create.." -Can you post the code that you have so far, so we can work on it?
Barton68
04-08-2008, 02:47 PM
Hi,
no problem...
Layout Design (http://www.maiocv.com/test/screen-design.jpg)
Thanks again for any help,
Barton
Barton68
04-08-2008, 03:02 PM
I've deleted the whole lot because it was rubbish and frustrated me so much.
:(
WebJoel
04-08-2008, 09:14 PM
You posted an image, -not code, -but that is okay too because that tells me alot. This particular layout is fairly simple. I will try to write-up a mock for this tomorrow sometime, and post it back.
Barton68
04-09-2008, 02:34 AM
Thank so much, been trying for almost a week.
I've tried divs, tables, and frames. All seem to work until I confirm in BrowserShots... :(
Hydro
04-09-2008, 03:30 AM
You should look at creating an overall div that you apply a style to so that it is centered:
body {background-color:#e1ddd9; font-size:12px; font-family:Arial, verdana, helvetica, georgia, times new roman, times, sans-serif;
color:#564b47; padding-bottom:25px; /* IE does not understand "margin-bottom" on BODY, so padding-bottom instead*/}
ul li {float:left; /* cure IE5.x "whitespace in lists" problem */width: 100%;}
ul li a {height:1%; /* make links honour display:block properly */}
#wrapper {position:relative; width:85%; margin:30px auto 3px auto; background-color:#fff; height:400px; margin-bottom:-3px;}
#wrapper p {margin:10px; color:black; background-color:transparent}
* html #content {height:100%;}/* and feed older IE what it needs */
#header {width:100%; height:75px; border-bottom:3px double gray;}
#navs {position:absolute; left:0; top:80px; margin:10px; width:160px; padding:20px 0; height:273px; background-color:wheat;}
#navs li {margin:15px 0 5px 10px; list-style-type:none;}
#navs li a {}
#navs li a:hover{color:red; padding-left:5px;}
<div id="text">
<h1>Text Goes Here</h1>
<p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and
I will give you a complete account of the system, and expound the actual teachings of the great explorer of
the truth, the master-builder of human happiness.</p>
<p>No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how
to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who
loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances
occur in which toil and pain can procure him some great pleasure.</p>
<p>To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some
advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that
has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?</p>
<p>On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized
by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that
are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is
the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish.</p>
<p>In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best,
every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty
or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted.
The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure
other greater pleasures, or else he endures pains to avoid worse pains.
</p>
<h1>Text Goes Here</h1>
<p>But I must explain to you how all this mistaken idea of denouncing pleasure and praising pain was born and
I will give you a complete account of the system, and expound the actual teachings of the great explorer of
the truth, the master-builder of human happiness.</p>
<p>No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how
to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who
loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances
occur in which toil and pain can procure him some great pleasure.</p>
<p>To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some
advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that
has no annoying consequences, or one who avoids a pain that produces no resultant pleasure?</p>
<p>On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized
by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that
are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is
the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish.</p>
<p>In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best,
every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty
or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted.
The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure
other greater pleasures, or else he endures pains to avoid worse pains.
</p>