|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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é |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On Apr 29, 9:28 am, André Wagner <andre....@gmail.com> wrote:
> 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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On 2008-04-28, André Wagner <andre.nho@gmail.com> wrote:
> 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. |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
> 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 ful, and even if wasn't exactly what I was looking for, they'll ! Regards! André |
|
![]() |
| Outils de la discussion | |
|
|