Link to home
Start Free TrialLog in
Avatar of dattanij
dattanij

asked on

Minimising web browser with a table on the page.

Hi,
I have a table in Dreamweaver with 2 columns, the first column has an image, then second has some text.  When I run the code the web browser appears as normal as a full screen.  However when I minimise this screen the text moves against the image in the first column.

How can I stop this from happening?

Thanks
Avatar of klykken
klykken

Hi Dattanij,
would you mind pasting the code for the table in here?
Could be several reasons for this happening, once I see the code it should be easy :-)
--
klykken
Avatar of dattanij

ASKER

Thank you,

here is an example:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="75%" border="0">
  <tr>
    <td width="21%"><img src="../greenbanner.gif" width="89" height="492"></td>
    <td width="79%" valign="top" nowrap>This is a test table, you will see if
      you minimise the screen this text will move closer to the image.</td>
  </tr>
  <tr>
    <td width="21%">&nbsp;</td>
    <td width="79%">&nbsp;</td>
  </tr>
</table>
</body>
</html>
SOLUTION
Avatar of klykken
klykken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you select the cell with the text and go..
Modify/Table/Insert column..it seems to behave.

Z
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The are two ways to do this quite simply:

1) Put cell padding on the table (this will force a space between the cell border and whatever contents is within the cell).

Select the table, then in the properties window, put a value into the CellPad box (try 5).

2) Add a new row at the top of the table, and put a shim in each (a transparent gif image) with set widths.

Let me know if you'd like help on this.  I'll put code in for one or both of these options if you''d like.

Aaran
Cellpadding will put the space on ALL sides of the contents of the cell. If that's OK, use it. If it's NOT, you can't use cellpadding to do what you want.

A spacer graphic can work, BUT you'll need to really play with it to make it do what you want, and often it's more hassle than it's worth. Also, when you resize the table,the text will reflow, and will likely look really crappy when it flows AROUND the spacer and up against the border of the other cell.

The row with the shims can work very well, but it's basically setting the table to a fixed minimum width. While the table won't shrink past a certain point (the size of the shims) it WILL resize larger, and (again) all the images/text will shift. If you don't mind this (and you might not), the shim row can be a great solution.

If you don't want the table to resize AT ALL, you have to fix the size as a fixed pixel size.

As you see, there's more than one way to do this, and which works best for you depends on how flexible your design is.
Avatar of zenlion420
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: webwoman{7183006}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

zenlion420
EE Page Editor
Actually, I'd like to point to my first comment after dattanji posted his code which directly relates to his problem.
Webwoman's comment is as always full of wisdom, but in this case more of a comment to aarans comment.
However I could of course be wrong :-)

-klykken
How about a split?  Would you feel okay with that?

j
Absolutely

-klykken
Okay, done:

New recommendation, as it stands - PAQ'd and pts split between klykken{7180843} and webwoman{7183006}.

If anyone disagrees with this recommendation, please state your reasoning within the next six days.

zenlion420
EE Page Editor
klykken FYI:

My original choice was WW's first post in the Q, not the one post-aaran.  The little numbers inside the tildes are a new clean-up format being introduced.  The numbers are the CID, if you ever want to check which comment is being proposed as an accepted answer in the Rec's being generated with this format, view the page source.  I think it comes in handy sometimes.  Thanks for the input.

aloha,

j