Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

How do I stop a cell from extending across the page
 

Agent_JC




quote this post edit post

IP Loged report this post

Old Post  12-30-05 - 03:24 AM  
Hello and thankyou in advance:

I'm about to tear my hair out.

I have set up a dynamic table which includes a cell that holds a lot of text
(personal profile) from my database of employees. The problem I have is the
text doesn't flow from line to line, it just stretches accross into the futu
re.
I have fixed all my table width sizes on the page.

I guess I just want to know how to make text flow from line to line and not
expand a table or it's cell.

Kind regards,

Josh.





Post Follow-Up to this message ]
Re: How do I stop a cell from extending across the page
 

John Waller




quote this post edit post

IP Loged report this post

Old Post  12-30-05 - 03:24 AM  
> I guess I just want to know how to make text flow from line to line and
> not
> expand a table or it's cell.

You can't. It's how HTML tables work. They adjust to accommodate the
contents within them taking into account the requirements of adjoining
cells. If adjoining cells are empty, they shrink or collapse to allow other
adjoining cells containing the most data to occupy the most screen real
estate.

Many people treat HTML tables as spreadsheet cells, which they're not. This
creates the frustration.

You can judiciously insert spacer images (tiny transparent GIF images) in
adjoining cells to stop them collapsing and force word wrap in adjacent
cells. Spacers (or shims) set a minimum cell width. It's an old, outdated
technique. It's deprecated. It's frowned upon by web veterans. But it can
still be helpful in certain circumstances.

An alternative is a hybrid of HTML tables with CSS. Example here:
http://www.projectseven.com/tutoria...ss_td/index.htm

All depends on how your page is laid out and what kind of data you're
reading from the database.

Can you provide a URL?

--
Regards

John Waller




Post Follow-Up to this message ]
Re: How do I stop a cell from extending across the page
 

Joe Makowiec




quote this post edit post

IP Loged report this post

Old Post  12-30-05 - 03:24 AM  
On 29 Dec 2005 in macromedia.dreamweaver, Agent_JC wrote:

> I have set up a dynamic table which includes a cell that holds a lot
> of text (personal profile) from my database of employees. The
> problem I have is the text doesn't flow from line to line, it just
> stretches accross into the future. I have fixed all my table width
> sizes on the page.
>
> I guess I just want to know how to make text flow from line to line
> and not expand a table or it's cell.

It's in the nature of HTML elements to expand until they run into
something.  So if you have a simple table structure like this:

<table>
<tr>
<td>Lorem ipsum dolor sit amet...</td>
</tr>
</table>

the td (and thus the <tr> and the <table> ) will expand with the amount
of contents until it hits something, presumably the right side of the
browser viewport.  It's only at that point that the text will start to
wrap.

If there is something constraining the table's width, then the text
will wrap when it hits that.  You have a few options:

- HTML attribute:
<table width="450" ...>
- CSS:
<table style="width:450px;" ...>
Either of these can be applied to <table>, <tr> or <td>, although
applying them to <tr> can be flaky.  The CSS also is preferably applied
through a class or identifier rather than through an inline style as it
is in the example.
- Containing structure:
<style type="text/css">
#container {
width : 450px ;
}
</style>
...
<div id="container">
<table ...>

If you give us the URI to your page, somebody will be able to help
advise you the best way to go about it for your page.

--
Joe Makowiec
http://makowiec.net/
Email: http://makowiec.net/email.php


Post Follow-Up to this message ]
Re: How do I stop a cell from extending across the page
 

Agent_JC




quote this post edit post

IP Loged report this post

Old Post  12-31-05 - 08:17 AM  
John:

Thanks for your reply. Have fixed the problem.

Happy new year,

Josh.


Post Follow-Up to this message ]
Re: How do I stop a cell from extending across the page
 

Agent_JC




quote this post edit post

IP Loged report this post

Old Post  12-31-05 - 08:17 AM  
Joe:

Thanks for your reply. Have fixed the problem.

Happy new year,

Josh.


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 11:49 PM. Post New Thread   
  Previous Last Thread   Next Thread next
Dreamweaver archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top