Re: making a bottom margin
- From: meltedown <groups2@xxxxxxxxxx>
- Date: Sun, 13 Nov 2005 16:17:06 GMT
Spartanicus wrote:
meltedown <groups2@xxxxxxxxxx> wrote:
Again: (a) Floats are for having inline content flow beside and beneath the floated element.
Floating is *not* a method to align elements. Floating is *not* an appropriate method to create a "CSS layout".
If possible floats should be avoided except when used for their intended purpose (a).
So the obvious question is: if I want to align elements, and I don't want the content to flow beside and beneath anything, should I just tables ?
Tables are for marking up tabular data, not for formatting or layout.
Left aligning is the default for block level elements, use margins if you want to right align a block level element, like so: <div style="width:50%;margin-left:auto">foobar</div>
Right aligning inline level content is done with the text-align property, like so: <p style="text-align:right">Some text.</p>
Like my home page, which has 3 columns, floated but not flowing. I don't wnat it to flow. So should I just put the 3 columns in a table ?
There are 2 proper ways to create a 3 column "CSS" layout: by using absolute positioning or by using a CSS table. It should be noted that IE doesn't support CSS tables. This has led to the widespread abuse of floats, despite the fact that doing so causes a myriad of problems. Floats used to create a "layout" is a hack, and a nasty one.
Well thanks for clarifying. I always thought tha absolute positioning was something to be be avoided. Not that I figured that out myself, its read in books, on web pages and in this newgroup. ( a couple years ago).
It seems the advice is constantly changing.
I just wish I could learn how to make css layouts without it being a night mare everytime I try to do anything.
Like with floats, absolute positioning has the disadvantage that the positioned elements are removed from the flow, this limits the layout options, usage of for example a footer directly below the content may not be an option.
.
- References:
- making a bottom margin
- From: meltedown
- Re: making a bottom margin
- From: meltedown
- Re: making a bottom margin
- From: Spartanicus
- Re: making a bottom margin
- From: meltedown
- Re: making a bottom margin
- From: Spartanicus
- Re: making a bottom margin
- From: meltedown
- Re: making a bottom margin
- From: Spartanicus
- Re: making a bottom margin
- From: meltedown
- Re: making a bottom margin
- From: Spartanicus
- making a bottom margin
- Prev by Date: Re: making a bottom margin
- Next by Date: Re: Header, 3 column & footer layout problem - help!
- Previous by thread: Re: making a bottom margin
- Next by thread: Re: making a bottom margin
- Index(es):
Relevant Pages
|