HighDots Forums  

div presentation order

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss div presentation order in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
André Wagner
 
Posts: n/a

Default div presentation order - 04-28-2008 , 06:28 PM






Hello,

can I change the order in which the divs are presented using CSS?

For example, lets say I have this page

<div class="A"> Div A </div>
<div class="B"> Div B </div>

and I want it to be presented in the webpage like this:

Div B
Div A

I know you can do that with complex schemes like relative positioning
and negative top, but there's any simple and straightforward way to do
that?

Regards,

André

Reply With Quote
  #2  
Old   
Patricia Aldoraz
 
Posts: n/a

Default Re: div presentation order - 04-28-2008 , 10:45 PM






On Apr 29, 9:28 am, André Wagner <andre.... (AT) gmail (DOT) com> wrote:
Quote:
Hello,

can I change the order in which the divs are presented using CSS?

For example, lets say I have this page

div class="A"> Div A </div
div class="B"> Div B </div

and I want it to be presented in the webpage like this:

Div B
Div A

I know you can do that with complex schemes like relative positioning
and negative top, but there's any simple and straightforward way to do
that?

Regards,

André
You know, of course, that you can change the order in the html and
that this is simple. You know that you can change the order via
positioning but that this is regarded by you as not simple. You want
no css positioning, no reordering in the html but you want reordering.
Will you accept absolute positioning? What about floats:

<div style="float: right; width:50%;background: red;"> Div A </div>
<div style="float: left; width:50%;background: green;"> Div B </div>

This gives an appearance of presentational reorder!



Here is some reordering


Reply With Quote
  #3  
Old   
Ben C
 
Posts: n/a

Default Re: div presentation order - 04-29-2008 , 02:43 AM



On 2008-04-28, André Wagner <andre.nho (AT) gmail (DOT) com> wrote:
Quote:
Hello,

can I change the order in which the divs are presented using CSS?

For example, lets say I have this page

div class="A"> Div A </div
div class="B"> Div B </div

and I want it to be presented in the webpage like this:

Div B
Div A

I know you can do that with complex schemes like relative positioning
and negative top, but there's any simple and straightforward way to do
that?
No. The only real way to do it is with positioning (you could also use
absolute positioning), but for anything but a very simple page that will
be very difficult to manage.

More feasible would be to pull the DOM tree apart with scripting and put
it back together again in a different order.


Reply With Quote
  #4  
Old   
André Wagner
 
Posts: n/a

Default Re: div presentation order - 04-29-2008 , 06:08 AM



Quote:
No. The only real way to do it is with positioning (you could also use
absolute positioning), but for anything but a very simple page that will
be very difficult to manage.

More feasible would be to pull the DOM tree apart with scripting and put
it back together again in a different order.
Ok, thank you for both sugestions. Both were good and very helpful,
and even if wasn't exactly what I was looking for, they'll help!

Regards!

André


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.