Author |
Topic |
|
bjlt
Senior Member
1144 Posts |
Posted - 23 October 2003 : 04:34:50
|
1. <table><tr><td align=left>left</td><td align=right>right</td></tr></table>
That's the only way I know to align two parts one to left and the other to right respectively. My question is: what are the other ways to achieve the same result?
2. how to make a td occupy the available width? <table><tr> <td width=5%>row I want to set a fixed width</td> <td width="">row width is not fixed. e.g. strings</td> <td >row I want to set the available width</td> </tr></table>
is it ok to set td width="100%" to occupy all the available width, and are there any other ways to do it?
I used to set width="100%" for the third td in the above example, it works fine in normal webpage but may cause an overflow when placed iframe output to a div from a hidden iframe. I suppose the browser handle inframe div a bit differently so the sum of 5%+100%+lengh-of-the-string, which is more than 100%, caused the overflow. My question is, are there other ways set the width of a td that of available lenght while not causing overflow in iframe as described above? Thanks in advance.
|
Edited by - bjlt on 23 October 2003 06:11:50 |
|
D3mon
Senior Member
United Kingdom
1685 Posts |
|
laser
Advanced Member
Australia
3859 Posts |
Posted - 23 October 2003 : 04:50:55
|
1. DIV tags within each TD ?
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 October 2003 : 05:01:16
|
do you have an example that causes it to overflow, as I can't reproduce you problem. |
|
|
bjlt
Senior Member
1144 Posts |
Posted - 23 October 2003 : 05:22:28
|
Thanks guys.
About the overflow, I'm afraid that I don't have an example right now as I've removed the code causing the problem well, please accept my applogy it may not be a normal iframe which caused the problem. the way I did it was to load content to a hidden iframe, and output it to a div, changing the div's display attribute from hidden to block using javascript. the div is inside a table with a fixed width, and caused the overflow. I'm trying to reproduce the code now, may take a few minutes or logner. |
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 October 2003 : 05:37:30
|
why are you copying it from the iframe to a div ? |
|
|
bjlt
Senior Member
1144 Posts |
Posted - 23 October 2003 : 05:58:02
|
that way I can load content from another page only when it's requested, e.g. show thread of a topic when requested but not load and hide them at the beginning. when requested, another page is processed and the content is put back to the hidden iframe, and then load to the div, I have a link descrbing the tech, will post it here later.
well, I can't reproduce it in a simple example right now. I may take longer to figure out how to do it wrong , guess it's also related to the css and content inside the middle td I mentioned. |
|
|
bjlt
Senior Member
1144 Posts |
Posted - 23 October 2003 : 06:10:13
|
Sorry for the bothering of the second question. I can't reproduce it now well generally, is it ok to set td width="100%" to occupy all the available width, and are there any other ways to do it?
about loading external source files: http://www.dansteinman.com/dynduo/en/source.html http://dhtmlnirvana.com/oldalchemy/externalload.htm
I think it's the tech used by ms library, you can see loading when the collapsing index is clicked |
Edited by - bjlt on 23 October 2003 06:20:12 |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
|
bjlt
Senior Member
1144 Posts |
Posted - 23 October 2003 : 06:18:52
|
quote: Originally posted by D3mon
yes, you can set 100%, so long as you don't set additional percentages for other TD widths.
then it's ok to have td width=2px td width="" td width="100%" but not td width=2% td width="" td width="100%"
|
|
|
HuwR
Forum Admin
United Kingdom
20584 Posts |
Posted - 23 October 2003 : 07:07:55
|
quote: Originally posted by D3mon
yes, you can set 100%, so long as you don't set additional percentages for other TD widths.
never had a problem doing it before.
Bjlt, if you set the tables width, the columns without ansizing should ALLWAYS fill up the remaining space regardless of their content |
|
|
bjlt
Senior Member
1144 Posts |
Posted - 23 October 2003 : 07:38:30
|
Thank you all.
I've changed my first td width to pixel. I will see later on if there's any overflow should I code pages similar to the ones that had the problem before. It's likely that the porblem was caused by a sum of more than 100% for the table width.
How about my first question? Any ways to do it without table? |
|
|
D3mon
Senior Member
United Kingdom
1685 Posts |
|
|
Topic |
|