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!

Fixed width of Table?

Status
Not open for further replies.

Bickyz

Technical User
Feb 7, 2003
239
GB
Iam creating table and cells in layout view to design my page. The problem is that when i type something the width of the table automatically increases and the next cell becomes smaller. Is there anyway i can fix the width of the cell so instead of expanding the cell it will continue in next line and also prevents from other cell being small. I tried from standard view but same problem.

And also is there way that i can put border in cell or table in layout view. I can do it from standard view but not from layout view.
 
Just set the width of each TD tag in pixcels for the top row

[Peace][Pipe]
 
Also, remember that the next cell only becomes smaller because it is empty. If you start typing in that cell it will resize - and correspondingly the first cell will also resize to accommodate. A cell will always expand to fit whatever has been put in it unless you set its width and/or include a "fixing" row:

If you want to definitely make sure that certain cells stay open at a certain size you will need to put 1x1 pixel transparent gifs into either the top or bottom row of the table and set an appropriate width using the Properties Inspector. It doesn't matter whether you create a top or bottom row to do this because at 1px high no-one will notice.

For instance, I might have a table with two columns - one for a menu, the other for content. I might want the table to fit the width of the browser window so I set its width to 100%. However, if I type content into the right column there is a chance the left column could start contracting. By inserting an extra row and placing an invisible gif in the left column, setting its width to, eg 200px, I can ensure that my menu column always stays at that width and no less.

Ice hockey nostalgia at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top