Playing with floats

  • Thread starter Luigi Donatello Asero
  • Start date
L

Luigi Donatello Asero

Hello,
if I have 3 containers and I want to position one on the left, one on the
right and one on the middle without using absolute positioning so that I can
still see all of them regardless of the width of the browser window how do I
adjust the margins in a way that one of them floats to the right although
these columns do not have the same length?
See
https://www.scaiecat-spa-gigi.com/it/test.html
 
H

Harlan Messinger

Luigi said:
Hello,
if I have 3 containers and I want to position one on the left, one on the
right and one on the middle without using absolute positioning so that I can
still see all of them regardless of the width of the browser window how do I
adjust the margins in a way that one of them floats to the right although
these columns do not have the same length?

float: right;

The margin has nothing to do with it.
 
L

Luigi Donatello Asero

Harlan Messinger said:
float: right;

The margin has nothing to do with it.


A <div> which is floated tends to take a position which is more on the top
(if there is space there)
instead of the one which is more on the right,
does it not?
 
J

JDS

Hello,
Hi!

if I have 3 containers and I want to position one on the left, one on
the right and one on the middle without using absolute positioning so
that I can still see all of them regardless of the width of the browser
window how do I adjust the margins in a way that one of them floats to
the right although these columns do not have the same length?

This can't be done with three static containers. But a close
approximation can be achieved using 3 variable layout containers, several
static dimensioning attribute containers, and at least one external
stylesheet. Plus some Javascript, to massage the layout into a
bi-functional multilevel dimensioning scheme, while retaining a variable
width and center, but a static weight and height.

I can provide a detailed example, if you wish. And of course, please feel
free to post any questions about specific problems you encounter when
implenting a multi layered static width dimension schem that must also
retain vartiable flexibility in its height and margin layout.

later...
 
H

Harlan Messinger

Luigi said:
A <div> which is floated tends to take a position which is more on the top
(if there is space there)
instead of the one which is more on the right,
does it not?

I don't know what you mean by "more on the right". Like everything on
the screen, a floated DIV has a horizontal and a vertical location. A
right-floated DIV floats to the right of its container. Its vertical
position is the same as it would have been if it hadn't been floated. If
a right-floated div is the first thing in its container, then it will be
positioned at the top right corner of its container.
 
P

Paul Watt

JDS said:
This can't be done with three static containers. But a close
approximation can be achieved using 3 variable layout containers, several
static dimensioning attribute containers, and at least one external
stylesheet. Plus some Javascript, to massage the layout into a
bi-functional multilevel dimensioning scheme, while retaining a variable
width and center, but a static weight and height.

I can provide a detailed example, if you wish. And of course, please feel
free to post any questions about specific problems you encounter when
implenting a multi layered static width dimension schem that must also
retain vartiable flexibility in its height and margin layout.

later...

"bi-functional multilevel dimensioning scheme"...one of the best things I've
heard in ages. With the possible exception of a t-shirt I saw that said
"Frankie says you're gay".

--
Cheers

Paul
le singe est dans l'arbre
http://www.paulwatt.info
 
D

dorayme

JDS said:
This can't be done with three static containers. But a close
approximation can be achieved using 3 variable layout containers, several
static dimensioning attribute containers, and at least one external
stylesheet. Plus some Javascript, to massage the layout into a
bi-functional multilevel dimensioning scheme, while retaining a variable
width and center, but a static weight and height.

Jesus! I guess you better show it in action... I can hear the
roar of a V8 when I read this.
 
M

mbstevens

This can't be done with three static containers. But a close
approximation can be achieved using 3 variable layout containers, several
static dimensioning attribute containers, and at least one external
stylesheet. Plus some Javascript, to massage the layout into a
bi-functional multilevel dimensioning scheme, while retaining a variable
width and center, but a static weight and height.

That sounds more complex than the Hot Rats album, but
I imagine the kind of float Luigi'd be most comfortable with is a rubber
ducky.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top