Topic: Unwanted space Pages that link to <a href="https://ozoneasylum.com/backlink?for=9659" title="Pages that link to Topic: Unwanted space" rel="nofollow" >Topic: Unwanted space\

 
Author Thread
BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 07-17-2003 11:07 Edit Quote

Our air-conditioning isn't working and I'm having a melt down. (My brain is going... I can feel it. - Hal)

Is there anything I can put inside a table cell that don?t take up any space but can be controlled to expand with a "width" tag?

Did that make any sense at all? Let me try and explain this better.:
If a TD tag is empty it's as good as not there, right? Setting a width on the TD itself won't work since it doesn't contain anything.

What I have to do is fill it with something that's possible to control with a width tag. Normally I'd just throw a non breaking space or a spacer image in there. That won't work this time because sometimes the width variable has to be empty (long story). The result of a spacer image with no width or height is still 1 px at it's smallest. So can you think of something that will truly disappear when the width value is 0?

Alternatively - is there some way that I can set the width of an empty TD cell that I'm forgetting?

Thanks in advance!



[This message has been edited by BlueHarvest (edited 07-17-2003).]

synax
Maniac (V) Inmate

From: Cell 666
Insane since: Mar 2002

IP logged posted posted 07-17-2003 16:00 Edit Quote

I'm not sure I understand the question.

You want to be able to control the width of a table cell without actually defining it's width? And you want it to appear empty? If that's the case, then you could use CSS or make a transparent GIF of the dimensions you need.

It may help to clear up your question a little.

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

IP logged posted posted 07-17-2003 17:05 Edit Quote

As synax said a nbsp should do - in the good old days we'd have used a single transparent pixel but those days are gone now

___________________
Emps

FAQs: Emperor

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

IP logged posted posted 07-17-2003 18:14 Edit Quote

Is the page being generated by a script?

If so write the script to put a &nbsp; in the cell if width > 0 and put nothing in the cell if width == 0.

If you are making the page by hand do the same thing you just have to run the program in your head.




-- not necessarily stoned... just beautiful.

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 07-18-2003 11:15 Edit Quote

Thanks for thrying to help! I understand your confusion... it's difficult to explain without becoming terribly long winded.

The page is being generated through a content management tool which I'm doing HTML templates for. The problem is that the content
management tool needs a number of unique tags to enable users to insert images, wite text etc. These tags, if unused leave unwanted spaces behind.

Like so:

code:
<table>
<tr>
<td>
{Tool specific tag which inserts an image}
</td>
<td width="{Tool specific tag to insert a certain number if there is an image above}">
</td>
</tr>
</table>



Something like this is used to make sure text wraps nicely around images, with "padding" to the right, see? (Obviously I know there are far better ways of doing this but they're not available to me in this project.)

Again, the problem is that the width I'm setting for the empty TD to the right of the image is ignored if there is nothing inside the cell. The cell has to be 0 pixels in width if there is no image to the left of it - so I'm looking for a way to get around this with ordinary plain ol' HTML.

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

IP logged posted posted 07-18-2003 16:49 Edit Quote

you tried a transparent image with 0 pixel width, right?

BlueHarvest
Nervous Wreck (II) Inmate

From: Västerås, Sweden
Insane since: Dec 2002

IP logged posted posted 07-21-2003 09:00 Edit Quote

Of course, yes. Unfortunately that leaves a one pixel space behind, even if both width and height are set to zero. What I can do is fill the cell with another table with everything set to zero. That won't take up any space but it's really awful coding. :-(



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu