Richard wrote:
> kchayka wrote:>>
>
> > Richard wrote:
>
> >> http://1-large-world.com/div1.html
>
> > Um, no offense, but I hope nobody takes your code, unless they want to
> > fix it so it works in a www context. Fixed px size boxes that contain
> > text are a ghastly idea, and it never would have occurred to me to
> > absolutely position _and_ float the same element. I can't imagine what
> > it is supposed to accomplish.
>
> Purely as an excercise and one possible way of how to accomplish the effect.
But not a way that anyone hoping to create a usable site should actually
use.
> My use of the elements came from ideas presented in various websites,
> including w3.org.
Your particular combinations are strange. Wherever did you see them
used this way at w3.org? Absolutely positioning a floated element
doesn't make any sense. If you read the specs I pointed to, you might
begin to understand this.
> It is necessary to "float" the division if you want it on the side of
> another.
> You're not floating the element.
Um, <div> is an element, same as <p> or any other block is.
div.parent1 {
position: absolute; <--
width: 600px;
height:25px;
float: left; <--
}
One of those two properties is superfluous. I won't hazard a guess as
to which one.
> And if divisions are not supposed to contain text, then why do we have
> divisions at all?
I guess you don't know much about structural markup, either. <sigh>
You totally missed the comment about sizing the block in px units. This
is the main problem. The actual text size used cannot be predetermined
so the containing block size cannot be predetermined, at least not in px
units. You'd have much better luck with em units, as the container
would than scale with whatever text size was actually used. Ideally,
you should be using some combination of % and em, so the box sizes scale
with both window and text size.
> The layout shows how to work around various problems and the fact that
> nowhere in it is a table.
But you introduce the problems of a fragile, pixel-perfect layout that
is even worse, IMO.
> As so many condemn their use, as they do frames.
> If tables and frames are not to be used, how else does one manage to put up
> a website at all?
If you are going to use CSS for positioning, I suggest you learn what
that really does, rather than hack up something that seems to work for
you, but will ultimately fail in the real world.
--
To email a reply, remove (dash)ns(dash). Mail sent to the ns
address is automatically deleted and will not be read.