Solved

fixed table/formatting text

Posted on 2006-06-15
6
567 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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

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.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

831 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