Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

fixed table/formatting text

Posted on 2006-06-15
6
Medium Priority
?
577 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 672 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 664 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 664 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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 style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

916 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