Solved

fixed table/formatting text

Posted on 2006-06-15
6
566 Views
Last Modified: 2008-03-06
I have a template that I want to use in a website, that is asp/access drivin.
my problem is I cannot have the middle cells where i will be placing dynamic data in large amounts to be unformated as it stetches the images and make the template all screwed up.

here is the template: http://www.dynamicdataworx.com/testtemplate/indexlike.html

 now if the large amount of text is formated (word wrap) then it looks fine in the left side and middle columns but if not if they entered everything on one line say like this : http://www.dynamicdataworx.com/testtemplate/badindexlike.html 

then I have a mess as you can see!

My question is what can I do here to make sure that does'nt happen? text will be dynamic in both the side and middle cells

will it keep my line brakes in access If I set up multiline text boxes like this for collecting the data, it seem to if you paste formatted text in access?

What about dynamic tables/lists i think they will stetch it, is there a way around that?
0
Comment
Question by:tracy36
6 Comments
 
LVL 7

Accepted Solution

by:
geordie007 earned 168 total points
ID: 16918835

the example that you have used may be the problem. that line of "h"'s won't wrap as - because there are no spaces - the browser wouldn't know where to wrap it if it could. the browser wraps at a space, so if you have no spaces, it won't wrap. try just adding a few spaces to your test text, and you may find that you don't actually have a problem. hope this helps.
0
 
LVL 30

Assisted Solution

by:callrs
callrs earned 166 total points
ID: 16922526
For text that's too long, you can insert a <wbr> tag
E.g.
1) xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
v.s.
2) xxxxxxxx<wbr>xxxxxxxxxxxxxxx<wbr>xxxxxxxxxxxxxxxxxxxx<wbr>xxxxxxxxxxxxxxxxxxxxxxxxxxxx

1) will will extend past border
2) will wrap at one or more of the "<wbr>" tags, but only if the long word reaches the end of the line
0
 
LVL 36

Assisted Solution

by:SidFishes
SidFishes earned 166 total points
ID: 16923855
no browser knows how to wrap a long unbroken string. You would have do do some server side code (on insert of the dynamic text to ensure max word length is not greater than x perhaps?)

but since line line of letters 300 chars long is probably not going to a real life issue....

you can have better control over your td widths by using style info

<td style="padding-left:20px; padding-right:20px;width:624px;display:block">

by using display:block browsers will build the cell out to it's max and not base the size on what is in the cell

You could also add a height: attribute but this doesn't always work as expected with dynamic content as you don't always know the height

You can specify the height and use overflow:auto

this limits the size of the element and if the content is larger, the browser will add scroll bars.

btw...it's good idea (necessary actually to be standards compliant) to be specific with your units padding-left:20; should be padding-left:20px;

 
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 30

Expert Comment

by:callrs
ID: 16923885
http://www.cs.tut.fi/~jkorpela/html/nobr.html     --> scroll down to "What about wbr ("word break")?"
Shows how an unbroken string can be broken to be wrapped
0
 

Author Comment

by:tracy36
ID: 16924578
the text will mostly be inserted with multiline text boxes(so that will keep the formating if they stay within the confines of the box?) if that's the case It would probably solve most of my problems exept for the dynamic lists.

I like the idea here quote:
<td style="padding-left:20px; padding-right:20px;width:624px;display:block">

by using display:block browsers will build the cell out to it's max and not base the size on what is in the cell

Will that force the data down and not out?
Any way I'll play with these ideas and get back to you. Thanks for all the comments!
0
 

Author Comment

by:tracy36
ID: 16939096
You all had really good ideas and gave me some insite I will split points with you all
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now