HighDots Forums  

Text wrapping on window resize?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Text wrapping on window resize? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JohnnyA webforumsuser@macromedia.com
 
Posts: n/a

Default Text wrapping on window resize? - 07-10-2003 , 08:34 PM






When using tables to place images and text on the page, what is the key to getting text (text that is actual content, not an image) to re-wrap as the page is shrunk or increased in the user's browser window?

I can't seem to get my text to change its wrapping and the window shrinks. It just gets cut off as the width decreases.

johnny



Reply With Quote
  #2  
Old   
Alexander Ross
 
Posts: n/a

Default Re: Text wrapping on window resize? - 07-10-2003 , 09:04 PM






make sure your table (the one that contans the text and images) has a width
that is a percent value and not a pixel value.

i.e. <table width="80% ...
as opposed to
<table width="500" ...


"JohnnyA" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
When using tables to place images and text on the page, what is the key to
getting text (text that is actual content, not an image) to re-wrap as the
page is shrunk or increased in the user's browser window?
Quote:
I can't seem to get my text to change its wrapping and the window shrinks.
It just gets cut off as the width decreases.

johnny





Reply With Quote
  #3  
Old   
JohnnyA webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Text wrapping on window resize? - 07-11-2003 , 10:15 AM



Alex, I noticed you refered to the cell the text and image was in. I had the text in a table in the td immediately to the right of the pic. When I put the text in the same td as the image, the word wrapping does automatically adjust as the browser window size is adjusted up and down.

I did not have pixel size on the td with the text by itself. I had 100% on it. I tried many combinations including putting the text directly into the td next to the image instead of into table that was in the td. It seems like text all by itself won't re-wrap.

Now that the text is the td with the image, I'm having trouble getting the text to align exactly where I want it. When I select the image and select alignment=left, the text aligns at the top of the image on the right. Selecting middle does nothing.

I really want the text aligned on the right at the middle of the pic. I can move the text down with carriage returns or with a transparent gif spacer image. However as the window is resized, what looked good in the maximized window doesn't look as good when the window is shrunk.

If there isn't a way to better align the text, I may have to settle for the spacer image method. That would be better than the carriage returns, I presume?

johnny




Reply With Quote
  #4  
Old   
Dan Vendel *GOF*
 
Posts: n/a

Default Re: Text wrapping on window resize? - 07-11-2003 , 10:27 AM



"JohnnyA" webforumsuser (AT) macromedia (DOT) com wrote:

Quote:
Alex, I noticed you refered to the cell the text and image was in. I
had the text in a table in the td immediately to the right of the pic.
When I put the text in the same td as the image, the word wrapping does
automatically adjust as the browser window size is adjusted up and down.
Quote:
I did not have pixel size on the td with the text by itself. I had
100% on it. I tried many combinations including putting the text
directly into the td next to the image instead of into table that was in
the td. It seems like text all by itself won't re-wrap.
Quote:
Now that the text is the td with the image, I'm having trouble
getting the text to align exactly where I want it. When I select the
image and select alignment=left, the text aligns at the top of the image
on the right. Selecting middle does nothing.
Quote:
I really want the text aligned on the right at the middle of the pic.
I can move the text down with carriage returns or with a transparent
gif spacer image. However as the window is resized, what looked good in
the maximized window doesn't look as good when the window is shrunk.
Quote:
If there isn't a way to better align the text, I may have to settle
for the spacer image method. That would be better than the carriage
returns, I presume?
Quote:
johnny




It doesn't matter whether you have pixels or percentage width. You could
have no width at all, and it should wrap anyway.
I tried to understand what you want to do, but a guess is that you want
an image to the left and text to the right in the same cell, and that
the text should align to the vertical center if the image. Is that so?
If correct, you can e.g. place a table with two columns in the cell,
image in the left cell, text in the right, vertically align "middle"
like this:

<table width="400" border="0" cellspacing="3" cellpadding="0">
<tr valign="middle">
<td><img src="images/image.jpg" width="96" height="74"
align="left"></td>
<td>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed
diam nonummy
nibh euismod tincidunt ut</td>
</tr>
</table>

--
Dan Vendel - *GOF*
http://www.vendel.info
Contact me directly by clicking here:
http://contact.vendel.info
Formmail tutorial:
http://www.vendel.info/tut/formmail.html
Nested table demonstration:
http://www.vendel.info/tabletut/



Reply With Quote
  #5  
Old   
JohnnyA webforumsuser@macromedia.com
 
Posts: n/a

Default Re: Text wrapping on window resize? - 07-13-2003 , 05:12 PM



Thanks, everyone, I got it working. I really aprreciate it.

johnny



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.