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

Using CSS & Layers in Layout vs Tables

Status
Not open for further replies.

Blueman2

Technical User
Aug 5, 2008
27
US
I am attempting to graduate from using tables for layout. I am using Dreamweaver mx 2004.

I want to create a central content area flanked on either side with a narrow 10px x600 graphic that I am using a borders. In a table, I would simply create a 3 column table.

I have created the central content layer (div). My question is: what is the best way to place these two graphic element borders? Should I nest them in the content area or just create two narrow layers that are absolutely positioned so they are adjacent to the contact area?

Thanks for your help
 
I would say neither. If they are just borders, why not create an image and place it as a background of your content area.

If not just add 2 additional layers, one on each side and float all 3 so they are side by side.

You should not need to position elements, and least of all absolutely position them. As that can result in many more problems than it solves.


Code:
<div id="borderleft">
</div>
<div id="contentarea">
</div>
<div id="borderright">
</div>

Code:
#borderleft{
float:left;
width:10px;
height:600px;
}

#contentarea{
float:left;
width:999px;
height:600px;
}

#borderright{
float:left;
width:10px;
height:600px;
}




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top