[css-d] How to 'clear' absolute?

2008-10-30 Thread Chang Huang
Hi, is there a way to clear a absolute positioned element? For example:


div style=position:absolute;
psome content/p
/div

div
psome more content/p
/div


How do I make the second div appear after the first one and not on top  
of it? Assume that I can't use float and the height of the first div  
is unknown (its content is dynamically generated).

Appreciate your help.
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] How to 'clear' absolute?

2008-10-30 Thread Gunlaug Sørtun
Chang Huang wrote:
 Hi, is there a way to clear a absolute positioned element?

No. A:P elements take up no space, and therefore can't be cleared or
otherwise interacted with space-wise.

You can prepare a space for the A:P, and control any expansion beyond
that by using some kind of 'overflow: auto/scroll' styling on it.

regards
Georg
-- 
http://www.gunlaug.no
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] How to 'clear' absolute?

2008-10-30 Thread Mark Senff
 Hi, is there a way to clear a absolute positioned element?
 For example:
 
 
 div style=position:absolute;
   psome content/p
 /div
 
 div
   psome more content/p
 /div
 
 
 How do I make the second div appear after the first one and not on top  
 of it? Assume that I can't use float and the height of the first div  
 is unknown (its content is dynamically generated).

Is there a reason for not doing it like this?

div style=position:absolute;
div
psome content/p
/div

div
psome more content/p
/div
/div

Granted, the second div will also be positioned absolute then, but it does 
follow your specs of the second one being placed right after the first one.



  
__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] How to 'clear' absolute?

2008-10-30 Thread Chang Huang
Hi, yes and no, because the element that follows the parent div with  
be on top of the parent div itself.

What I'm trying to do is make this markup into tabs:

div id=tabs

h3a href=#Tab1/a/h3
divTab 1 Content/div

h3a href=#Tab2/a/h3
divTab 2 Content/div

h3a href=#Tab3/a/h3
divTab 3 Content/div

/div


So far I've come up with 2 solutions:

1. Move all tabs (h3) up using P:A and then move them horizontally.  
But in order to move them horizontally, I need to know the width of  
each tab. So I can do something like 'left:80px;'.

The problem, I don't know the width of each tab as they are generated  
dynamically.


2. Make all divs inside div#tabs P:A and float the tabs (h3).

The problem, the element that goes after div#tabs will be placed on  
top because of the P:A. I can define a height for div#tabs, but again,  
the content of each tab is generated dynamically, so the height is  
unpredictable.


And this is where I'm at so far, stuck. And if you wonder why I'm not  
using this markup instead:

ul
lia href=#Tab 1/a/li
lia href=#Tab 2/a/li
lia href=#Tab 3/a/li
/ul

divTab 1 Content/div
divTab 1 Content/div
divTab 1 Content/div

it's just because of an accessibility issue, tabbing issue  
specifically. For instance, if there are 10 tabs, the user will have  
to hit the tab key 10 times in order to get to the content of the  
first tab, which I don't think that is something that they are happy  
with.

If you can think of any solution for my problem, please share.

Thanks!






On 31/10/2008, at 4:14 AM, Mark Senff wrote:

 Hi, is there a way to clear a absolute positioned element?
 For example:


 div style=position:absolute;
  psome content/p
 /div

 div
  psome more content/p
 /div


 How do I make the second div appear after the first one and not on  
 top
 of it? Assume that I can't use float and the height of the first div
 is unknown (its content is dynamically generated).

 Is there a reason for not doing it like this?

 div style=position:absolute;
   div
   psome content/p
   /div
   
   div
   psome more content/p
   /div
 /div

 Granted, the second div will also be positioned absolute then, but  
 it does follow your specs of the second one being placed right after  
 the first one.





__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/