2 replies [Last post]
Chromosome
Offline
newbie
Last seen: 16 years 42 weeks ago
Joined: 2004-04-10
Posts: 2
Points: 0

I've made a site layout using Relative positioning DIV. Only used relative positioning so the divs flow vertically, and the next DIV starts when the previous ends (let's suppose the content is variable).

http://xchange.100luz.com.ar/
http://xchange.100luz.com.ar/CSStyles/CSSStyleSheet.css

In the site example, each DIV is visually separated by a dotted line. I haven't been able to switch the order of the DIVs (eg. Putting the Second DIV on top of the FIRST DIV), without modifying the html code.

Is it possible to make it using only CSS? Again, the size of the DIVS is unknown since they will have dynamic content.

The containers DIVS are defined like this:

.MAINContainer {
	width: 680px;
	position: relative;
	clear: both;
	left: 50%;
	margin-left: -350px;
	padding-top: 150px;
	padding-right: 10px;
	padding-left: 10px;
	padding-bottom: 10px;
}

Thank you very much.

Big John
Big John's picture
Offline
Enthusiast
Arizona
Last seen: 17 years 13 weeks ago
Arizona
Timezone: GMT-7
Joined: 2003-10-29
Posts: 94
Points: 0

DIV Order using Relative Positioning

You can do it using absolute positioning, but that
won't work with dynamic elements unless you
use scripting to find the heights of the elements
and use those heights to control placement of
the AP elements. It could get complicated...

http//www.positioniseverything.net/

Chromosome
Offline
newbie
Last seen: 16 years 42 weeks ago
Joined: 2004-04-10
Posts: 2
Points: 0

Back the HTML

Hmmm... So there is no way to control the vertical layout from css. Sad
Seems I should then define the html position of each DIV according to the final place I want them to appear, and modify the html each time i want to alter the order of each DIV. Crying