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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<div> or <table>?

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB
The following code produces effectively a two column frame, .leftcol has a tree like menu which expands and contracts, .rightcol contains text.

<style>
.leftcol {
position: absolute ;
left: 0px;
width: 175px;
margin: 0x;
padding: 0x;
border: 1px solid black;
background-color: #cdf9fc;
z-index:-100;
}

.rightcol {
position: static ;
margin-left: 175px;
padding: 0px;
border: 1px solid black;
background-color: #cdf9fc;
}

p { font: 10pt Verdana; sans-serif; color: black;
padding: 20px; margin: 0;
border: 0px dotted black; }
</style>

What I would like to do is add a third column to contain graphics, with the content of each column beginning at the top of the page and not being affected by the content of the other columns.

Should the second column contain a table or should <div> be used to create a third column?

Thanks in advance HTH

Chris [pc2]
 
You will have more control over positioning etc if you use a div, tables will expand to fit thier content, you can make divs adhere to thier with by specifying overflow property etc. You could always nest the table inside the div if you need the table to help you position text or iamges
 
sjravee

Are you suggesting a <div> within a <div>, or a <div> to create a third column? HTH

Chris [pc2]
 
I'd use div to make third column, when you want things to stay in place i find that absolute postioning of divs is the best solution
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top