Problems with text-alignments.

Problems with text-alignments.

am 08.04.2008 03:16:48 von showandbeshown

Hi,

very often I need to put two short pieces of text in one line such
that the first piece is aligned to the left of the line and the second
one to the right. The way I do it is as following:


piece 1


piece 2



But I think it is not an elegant way to solve the problem. Do you know
a better one? (Pleas do not tell me to go to work in MacDonald's :) )

Re: Problems with text-alignments.

am 08.04.2008 03:49:15 von 23s

"Fro" wrote in message
news:829a2002-022a-4056-81b0-cd7a50e7ddcb@k37g2000hsf.google groups.com...
> Hi,
>
> very often I need to put two short pieces of text in one line such
> that the first piece is aligned to the left of the line and the second
> one to the right. The way I do it is as following:
>
>


>
piece 1

>

>
piece 2

>

>
> But I think it is not an elegant way to solve the problem. Do you know
> a better one? (Pleas do not tell me to go to work in MacDonald's :) )

Try this below (styles declared inside HTML, but easy enough to incorporate
into your external stylesheet).

The idea is that the text 'floats' to either left or right. Note that a
0.5em spacing is applied to left or right to ensure at least a 1em space
between the elements.

Beware of the 'clearright' css class... it may misbehave if you have other
right-floating elements in your page.

Not really sure if it's more 'elegant', but worth consideration?

"http://www.w3.org/TR/html4/strict.dtd">



Tester



leftmost text area
class="righttext">rightmost text area

next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next paragraph next
paragraph next paragraph next paragraph next paragraph next



Re: Problems with text-alignments.

am 08.04.2008 06:44:10 von Neredbojias

On 07 Apr 2008, Fro wrote:

> Hi,
>
> very often I need to put two short pieces of text in one line such
> that the first piece is aligned to the left of the line and the second
> one to the right. The way I do it is as following:
>
>


>
piece 1

>

>
piece 2

>

>
> But I think it is not an elegant way to solve the problem. Do you know
> a better one? (Pleas do not tell me to go to work in MacDonald's :) )

Burger Koenig, der hamburger fuhrer, uber alles!

As asdf implied, read-up on floats (but don't let them rain on your
parade...)

--
Neredbojias
http://www.neredbojias.com/
Great sights and sounds

Re: Problems with text-alignments.

am 08.04.2008 07:10:42 von lws4art

Fro wrote:
> Hi,
>
> very often I need to put two short pieces of text in one line such
> that the first piece is aligned to the left of the line and the second
> one to the right. The way I do it is as following:
>
>


>
piece 1

>

>
piece 2

>

>
> But I think it is not an elegant way to solve the problem. Do you know
> a better one? (Pleas do not tell me to go to work in MacDonald's :) )

"http://www.w3.org/TR/html4/strict.dtd">





bookends




piece 1piece 2





--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com