By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,879 Members | 1,859 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,879 IT Pros & Developers. It's quick & easy.

Change display order (vertical)

P: n/a
This may be a simple request, but I can't find documentation on it.
My page looks like the following:

Header information

Data Set A

Data Set B

Footer information

We'd like to be able to allow users to swap the display order of the
Data Sets, while keeping the document flow. We have, in general, the
page segmented:

<div class="Header">
Header Information
</div>
<div class="AllData">
<div class="DataA">
Data Set A
</div>
<div class="DataB">
Data Set B
</div>
</div>
<div class="Footer">
Footer Information
</div>

Is there a simple way to say "show DataB before DataA"?

If this is obvious, it will lend credence to my follow up question:
what is the definitive book for CSS, taking in to account IE 7.0 and
FireFox 2.0 (I know this may start a religious war...)

Thanks a lot,
DvS

Mar 16 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 2007-03-16, dv******@ddrtech.com <dv******@ddrtech.comwrote:
This may be a simple request, but I can't find documentation on it.
My page looks like the following:

Header information

Data Set A

Data Set B

Footer information

We'd like to be able to allow users to swap the display order of the
Data Sets, while keeping the document flow.
We have, in general, the
page segmented:

<div class="Header">
Header Information
</div>
<div class="AllData">
<div class="DataA">
Data Set A
</div>
<div class="DataB">
Data Set B
</div>
</div>
<div class="Footer">
Footer Information
</div>

Is there a simple way to say "show DataB before DataA"?
No. If the heights of DataA and DataB are known beforehand then you can
swap them with position: relative. Otherwise not possible in CSS. Your
best bet would be to use scripting to modify the DOM tree-- just detach
DataA and DataB from their parent, reattach them the other way round,
and let the document reflow.
Mar 16 '07 #2

P: n/a
On Mar 16, 1:26 pm, Ben C <spams...@spam.eggswrote:
On 2007-03-16, dvoms...@ddrtech.com <dvoms...@ddrtech.comwrote:
This may be a simple request, but I can't find documentation on it.
My page looks like the following:
Header information
Data Set A
Data Set B
Footer information
We'd like to be able to allow users to swap the display order of the
Data Sets, while keeping the document flow.
We have, in general, the
page segmented:
<div class="Header">
Header Information
</div>
<div class="AllData">
<div class="DataA">
Data Set A
</div>
<div class="DataB">
Data Set B
</div>
</div>
<div class="Footer">
Footer Information
</div>
Is there a simple way to say "show DataB before DataA"?

No. If the heights of DataA and DataB are known beforehand then you can
swap them with position: relative. Otherwise not possible in CSS. Your
best bet would be to use scripting to modify the DOM tree-- just detach
DataA and DataB from their parent, reattach them the other way round,
and let the document reflow.
I was afraid that was the answer. We'll go back to a server-side
solution and generate the Data sections in a different order.

Thanks a lot,
DvS

Mar 16 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.