English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have used HTML for a while, and the current site I am working on I am going to do in XHTML. However, I can't work out the CSS to get the left column in a two column table that is the width of the screen to be 125 pixels, and the other column to fill the rest of the table. I have tried setting the width attribute of one column to 125 pixels and leaving the other column alone, and this did not work, I tried setting the left column to 125 pixels and the right 100%, and this did not work either.

If you have any questions, please send me a message before answering. If you want I will give you a link to the site I'm developing so you can see how far I've got with the code.

2006-11-06 04:50:15 · 2 answers · asked by Mark R 2 in Computers & Internet Programming & Design

2 answers

You are going to have to set the parent to 100% width, then when you set the left column to 125px, the other colum will make up the difference automatically.

Example:






125 wide the rest of the space

2006-11-06 04:57:34 · answer #1 · answered by stan_naspinski 3 · 1 0

Set the width on the table element to 100%. Before the tbody, set up a col group of two cols, and style the first col to 125px: e.g.












Left cell Right cell

2006-11-06 04:55:45 · answer #2 · answered by Isofarro 3 · 0 0

fedest.com, questions and answers