Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 20th, 2003, 12:23 AM
Authorized User
Join Date: Aug 2003
Location: , , India.
Posts: 78
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to spraveens
Default Regarding Tables

   Iam Using a table which is flooded with data from a database, now when there is to much data ,the table's width keeps expanding accordingly ,now I want the width to be fixed no matter how much data come ,the height should expand rather than the width.How do I do It?



Reply With Quote
  #2 (permalink)  
Old October 20th, 2003, 01:10 AM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts

This is a most annoying problem...

The table's width may be set with a style attribute:
e.g. <table style='width: 200px'> each cell may also be set with the same attribute. Don't forget to include the unit of measurement, like 'px' because Mozilla in some cases will ignore the attribute all together if it is left off. The width attribute may also be specified in percentage.. style='width: 100%' or in other units of measurement like centimeters, or inches.

Also, if you have a long word in which the unbroken character width of the string is longer than that of the cell the browser will also ignore the attribute and force it to spread. For instance: 'asodifaoisdfadspofijapjd' when inserted into a cell and longer than the cell's width will cause it to be wider than the specified width.


: )

Smiling Souls
Reply With Quote
  #3 (permalink)  
Old October 20th, 2003, 04:46 AM
joefawcett's Avatar
Wrox Author
Points: 9,763, Level: 42
Points: 9,763, Level: 42 Points: 9,763, Level: 42 Points: 9,763, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,074
Thanks: 1
Thanked 38 Times in 37 Posts

To overcome the long word problem you could try:
style="word-wrap: break-word;"
as well as the width style.
I think this is IE only though.


Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating tables within tables in access??? carswelljr Access 3 August 23rd, 2006 01:21 PM
Fixed tables and/or fixed bkgrnd in tables slg111875 Dreamweaver (all versions) 1 June 22nd, 2006 02:31 PM
Tables mistry_bhavin ADO.NET 2 May 4th, 2004 09:16 AM
regarding tables spraveens Dreamweaver (all versions) 1 September 24th, 2003 07:21 AM
Tables andy24 Classic ASP Databases 3 July 23rd, 2003 11:09 AM

All times are GMT -4. The time now is 03:47 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.