Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 two simple html questions
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

bjlt
Senior Member

1144 Posts

Posted - 23 October 2003 :  04:34:50  Show Profile
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

Posted - 23 October 2003 :  04:40:02  Show Profile  Visit D3mon's Homepage
how can you have 100% + 5% ??

make it 95% total can only ever be 100% max.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 23 October 2003 :  04:50:55  Show Profile
1. DIV tags within each TD ?
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 October 2003 :  05:01:16  Show Profile  Visit HuwR's Homepage
do you have an example that causes it to overflow, as I can't reproduce you problem.
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 23 October 2003 :  05:22:28  Show Profile
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.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 October 2003 :  05:37:30  Show Profile  Visit HuwR's Homepage
why are you copying it from the iframe to a div ?
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 23 October 2003 :  05:58:02  Show Profile
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.
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 23 October 2003 :  06:10:13  Show Profile
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
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 23 October 2003 :  06:16:24  Show Profile  Visit D3mon's Homepage
yes, you can set 100%, so long as you don't set additional percentages for other TD widths.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 23 October 2003 :  06:18:52  Show Profile
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%"

Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 23 October 2003 :  07:07:55  Show Profile  Visit HuwR's Homepage
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
Go to Top of Page

bjlt
Senior Member

1144 Posts

Posted - 23 October 2003 :  07:38:30  Show Profile
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?
Go to Top of Page

D3mon
Senior Member

United Kingdom
1685 Posts

Posted - 23 October 2003 :  08:21:01  Show Profile  Visit D3mon's Homepage
None that are as easy as a table and so cross-browser friendly.


Snitz 'Speedball' : Site Integration Mod : Friendly Registration Mod
"In war, the victorious strategist only seeks battle after the victory has been won"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.43 seconds. Powered By: Snitz Forums 2000 Version 3.4.07