...

View Full Version : Having trouble with left and right column positioning



IamHe
05-21-2010, 10:36 PM
Hey guys,
im having a little trouble with a layout.
i dont think ill have to do too much explaining here because im sure its something every one will have had trouble with in the past.
i always avoid having 2 collums.
because i have trouble with possitioning when i drop a line in one , heres an image to show what i mean
http://img641.imageshack.us/img641/251/exampleeh.jpg (http://img641.imageshack.us/img641/251/exampleeh.jpg)

now i could counter the other collum with line breaks but im using a php include on the left collum, to get the text, so theres only 1 page , this is the homepage.

iframes are not an option but im stuck for any others.
dose any one know if theres a way of setting the table to be either absoloute or counter line breaks?

would appreaciate any help any one can provide.
thanks allot.

Excavator
05-22-2010, 02:10 AM
Hello IamHe,
Your just looking for a basic two column layout (http://nopeople.com/CSS/simple_2-column/index.html). Have a look at a couple more examples here - http://nopeople.com/design/CSS%20tips/index.html

If none of those interest you, post your code or give us a link to your test site and we might be able to help fixing what you've started with.
In the meantime, have a look at the links in my signature line. They can probably all help you.

IamHe
05-22-2010, 02:58 AM
Hello IamHe,
Your just looking for a basic two column layout (http://nopeople.com/CSS/simple_2-column/index.html). Have a look at a couple more examples here - http://nopeople.com/design/CSS%20tips/index.html

If none of those interest you, post your code or give us a link to your test site and we might be able to help fixing what you've started with.
In the meantime, have a look at the links in my signature line. They can probably all help you.
Hello Excavator, thanks for your response, here is an example of what my site is set out like...
http://364-days-to-go.info/sample.html

ive included the same table twice just to show the effect adding content has.
i need the right collum to stay possitioned at the top.

here is the code for the sample i put together.


<table width="870" border="0" cellspacing="0" cellpadding="0" bgcolor="#0000CC">
<tr>
<td width="21">&nbsp;</td>
<td width="501"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FF0000">CONTENT:</td>
</tr>
<tr>
<td bgcolor="#99FF33">&nbsp;</td>
</tr>
</table></td>
<td width="11">&nbsp;</td>
<td width="318"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FF0000">SITE:</td>
</tr>
<tr>
<td bgcolor="#009999">&nbsp;</td>
</tr>
</table></td>
<td width="19">&nbsp;</td>
</tr>
</table>

thanks again for all your help . i do appreciate it.

conecode
05-22-2010, 07:46 AM
You can change the alignment of a cell by add a little bit of CSS. In the code below, I used "vertical-align:top" to align the 2 columns.


<td width="318" style="vertical-align:top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#FF0000">SITE:</td>
</tr>
<tr>
<td bgcolor="#009999">&nbsp;</td>
</tr>
</table>
</td>

abduraooft
05-22-2010, 11:27 AM
here is the code for the sample i put together. Don't you know why using tables for layout is very bad (http://www.hotdesign.com/seybold/)?

Excavator
05-22-2010, 05:05 PM
Yes, what ab said.
More about tables in my signature below.

IamHe
05-22-2010, 06:38 PM
hey guys,
thanks for the reply's
i tried vertical align top and it didn't work :(

as for my layout being tables
its sliced straight from photoshop and has lots of images etc....

i usually tend to stick to programing and stay away from html css, but im trying to build my own site , ive never had a problem throwing a layout together, i do always use tables , but like i said im having issues with the collums.

so fist of all , can a image layout be properly coded without tables?
and will it cure my collum issues?

im out right now but as soon as i get home ill read up on those links in your sig... i briefly read through the one posted last nigh but will read it again when i get in and ill comment back then.
again thanks for the responses, and if someone could answer those 2 questions for me that would be great.

abduraooft
05-23-2010, 12:55 PM
Take a look at http://www.bonrouge.com/2c-hf-fluid%28r%29.php, which is a good 2 column CSS based layout. (You may set a fixed width to the #wrap, if required)

Excavator
05-23-2010, 04:18 PM
so fist of all , can a image layout be properly coded without tables?

Of course it can. I've written hundreds of webpages and I've never used a table in my life.


and will it cure my collum issues?
Yes.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum