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

Fix the width of a table 2

Status
Not open for further replies.

gms27

Technical User
Aug 19, 2005
27
PT
When i write inside a table and the letters reach the end, the writting doesen't jump to the next line, it just keeps stretching the table. The only solution i could find was usind the No wrap button but it does nothing.
Of course pressing enter twice when reaching the end does the job but its really easy to loose track, and screw things up again...
So the question is: how can i fix the width of a table?

Thanks
 
set a fixed width in the table,

The simplest way to do this is in your HTML code, change the <TD> tag so it says <TD WIDTH="100px">.

Just change the px to fit your requirements .. you could also use a % instead of px.

Rob
 
If you have enough time i would look into learning CSS ... it will make life a whole lot easier once you've learned it.

Rob
 
To perform this same thing using inline CSS (which will help to pass a validation check at would be as follows:
Code:
<td [!]style="width:100px"[/!]>

SW

-kaht

How much you wanna make a bet I can throw a football over them mountains?
sheepico.jpg
 
sorry guys but i did what you told and it's still not working...

<td width="700"> <div align="left">
<div align="left">
<pre> aaaaaaaaaaaaaaaaaaaaaaaaa

this is how dreamweaver sais it should be, i also tryed both your ways abd it still didnt work...
 
it sets the width but it doesnt prevents the letters from streching it
 
try adding a space in to your text, HTML doesn't like splitting words so it sees a string of letters as one word

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Sorry to do this to this post but just to demonstrate

[Peace][Pipe]
 
<pre> tags also break all the rules. They basically state that the text is preformatted and treats it as such. I'm not sure adding a space in a <pre> tag would make a difference, but if you remove the <pre> and add a space it should.

-kaht

How much you wanna make a bet I can throw a football over them mountains?
sheepico.jpg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top