Re: Two rows of links, use of DIV, align to the right
On 2 Apr, 16:25, Berlin Brown <berlin.br...@gmail.com> wrote:
> I removed "float: right", but I couldn't position the links to the
> right.
Floats are one problem, clearing after them is quite another!
Read <http://brainjar.com/css/positioning/>
You will probably have to modify your HTML and insert an element after
the <div>(s) such as <br>, <hr> (my favourite) or even another <div>.
This element has CSS clear:right; applied to it. The trick is to
realise that you _do_ need to add some extra HTML element(s) to your
page as "hooks" on which to hang more CSS. CSS alone doesn't and
cannot handle the whole problem itself. You might see advice to work
around this problem with CSS :after & content: instead. I don't advise
that in practice, as it doesn't work on IE.
It's not quite conformant HTML to use <br> here (although commonly
done), and so I prefer the <hr>, even though I then need to use some
more CSS to stop it displaying. Some people prefer an anoymous <div>
instead, again with the CSS clear applied to it.
Posting a URL to an example generally encourages a better response
than posting fragments.
|