PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.info.authoring.CSS > How set 3 different text on line with different styles?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How set 3 different text on line with different styles?

Réponse
 
LinkBack Outils de la discussion
Vieux 14/03/2008, 00h56   #1
gundam.f0rtre55@bluebottle.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How set 3 different text on line with different styles?

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:
200px; text-align: left; font: italic bold 25px Arial, sans-serif;
color: white; }

div#sentiment2 {position: relative; display: top: 30px; left: 8px;
width: 50px; text-align: left; font: italic bold 25px Arial, sans-
serif; color: red; }

div#sentiment3 {position: absolute; top: 30px; right: 0px; width:
250px; text-align: left; font: italic bold 25px Arial, sans-serif;
color: white; }

And this is the HTML
------------------------------

........

<div id="sentiment1">
May you and
</div>

<div id="sentiment2">
May
</div>

<div id="sentiment3">
May you and
</div>
...........

The first and the third are positioned correctly, BUT the 2nd will not
align between text1 and text3 (it is shifted somewhere in the page.

Does I'm doing wrong?

Thank you in advance for your suggestions,
Giovanni
  Réponse avec citation
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
Vieux 15/03/2008, 05h37   #3
Gus Richter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How set 3 different text on line with different styles?

dorayme wrote:
> In article
> <doraymeRidThis-E6305F.17054914032008@news-vip.optusnet.com.au>,
> dorayme <doraymeRidThis@optusnet.com.au> wrote:
>
>> In article
>> <doraymeRidThis-5D39A5.16585714032008@news-vip.optusnet.com.au>,
>> dorayme <doraymeRidThis@optusnet.com.au> wrote:
>>
>>> <http://netweaver.com.au/alt/giovani.html>

>> or perhaps you are meaning more like:
>>
>> <http://netweaver.com.au/alt/giovani2.html>
>>
>> ?

>
> or perhaps you might like something with some hidden
> sentimentality:
>
> <http://netweaver.com.au/alt/giovani3.html>


And don't forget my favorite: float left and right and allow the third
to flow between the two.

--
Gus

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 23h58.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08555 seconds with 11 queries