Afficher un message
Vieux 14/03/2008, 06h19   #2
gundam.f0rtre55@bluebottle.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How set 3 different text on line with different styles?

On Mar 14, 1:42 am, dorayme <doraymeRidT...@optusnet.com.au> wrote:
> In article
> <c858f3fa-c9e9-4177-b3a3-d60ff0616...@i7g2000prf.googlegroups.com
>
> >,

> gundam.f0rtr...@bluebottle.com wrote:
> > Hi all,

>
> > I should display 3 pieces of text as follows

>
> > ¦5px¦ <style1>Text1 ¦8px¦ <style>Text2 <style3>Text3 ¦150px¦

>
> > Each Text must have its own style and each text have a specific
> > distance between each others and between the left and right border.

>
> > This the style-code:
> > ----------------------------
> > div#sentiment1 { position: absolute; top: 30px; left: 10px; width:

>
> ...
>
> > Does I'm doing wrong?

>
> First you are sizing the fonts in pixels which will ruin
> everything when the user does not have the text size you are
> expecting (almost only IE makes it hard to change the text size
> when they are specified in pixels). In most browsers the user can
> change the text size and many users do.
>
> So the first thing to consider is to abandon pixels as units and
> use percentages or better still, em. You can then also size the
> boxes the texts go into in ems so they grow and contract with the
> font size. And transform your wish to have a specific distance
> between text into one of a number of other things. Two come to
> mind:
>
> A specific px distance between boxes
>
> An em distance between boxes
>
> Want examples?
>
> --
> dorayme


Yes,
I'm especially interested in the problem how to keep the three strings
on one line. The text in the strings is in "em" not "px".
If you have an example it would .

Thank you,
John
  Réponse avec citation
 
Page generated in 0,06184 seconds with 9 queries