IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Mise en page CSS Discussion :

Comment style blockquote?


Sujet :

CSS

  1. #1
    Membre régulier
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    179
    Détails du profil
    Informations personnelles :
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations forums :
    Inscription : Mai 2006
    Messages : 179
    Points : 117
    Points
    117
    Par défaut Comment style blockquote?
    bonjour,
    je ne sais pas comment se comporte exactement l'élément blockquote,
    voici le code CSS:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    blockquote {width:300px; font-style:italic;margin-left:auto; margin-right:auto; margin-top:60px;padding:20px 0 0 0;background:#ffc url(../images/q_O.png) 10% 0 no-repeat}
    blockquote p {padding:30px;margin:0;background:#ffc url(../images/q_C.png) 95% 95% no-repeat}
    le résultat est sur la page :
    http://chinesecarweb.com/news/byd-F3...-goes-on-sale/

    sous firefox 3, le pb c'est que l'élément est découpé en deux ! sachant que pour être valide Strict, il faut placer un <p></p> dans le <blockquote>, je remecie pour votre aide.

  2. #2
    Rédacteur
    Avatar de Macmillenium
    Homme Profil pro
    Développeur front-end
    Inscrit en
    Mars 2008
    Messages
    2 333
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 39
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur front-end
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Mars 2008
    Messages : 2 333
    Points : 3 748
    Points
    3 748
    Par défaut
    Bonsoir,
    Tu as :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    <p>
    Despite being described as a not so credible competitor by its Japanese rival Honda, BYD will fiercely fight to gain marketshare. In its "<a href="US$">5 things you should know about the F3 DM</a>", the author on her 4th point noted that in China the infrastructure is not suited for battery recharge at home, the reason is in a densely populated country, people live in 20 storey flat in general, you do easily imagine how hard it is, if you lived on the 2nd floor to plug your car !<br />Because the type of hybrid is quite new (Plug-in type, while the Prius is not of a plug-in type), we don't know yet the behavior in the long run of the BYD F3 DM. However, BYD will try to sell its new baby as soon as 2010 in the US, making an international debut. Its potential rival, <a href="http://www.usnews.com/blogs/fresh-greens/2008/12/18/chevy-volt-plant-construction-delayed.html">the Chevy Volt is delayed</a>, but one hope it is not delayed for too long :
    <blockquote>
    <p>A big part of what made the Volt notable is that it is ahead of the curve. If it becomes just another plug-in hybrid, the benefits to GM will be much smaller</p>
    </blockquote>
    <br style="clear:both" /> The Chevrolet Volt is priced at US$40,000 twice as much as the BY F3DM.
    </p>
    Attention : ton blockquote est entre les balises <p> et </p> alors que ces dernières ne peuvent contenir que des éléments de type inline et non pas de type block (blockquote, div, ul etc ...)

    C'est à dire pas de blockquote dans un paragraphe :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    <p>
    Despite being described as a not so credible competitor by its Japanese rival Honda, BYD will fiercely fight to gain marketshare. In its "<a href="US$">5 things you should know about the F3 DM</a>", the author on her 4th point noted that in China the infrastructure is not suited for battery recharge at home, the reason is in a densely populated country, people live in 20 storey flat in general, you do easily imagine how hard it is, if you lived on the 2nd floor to plug your car !<br />Because the type of hybrid is quite new (Plug-in type, while the Prius is not of a plug-in type), we don't know yet the behavior in the long run of the BYD F3 DM. However, BYD will try to sell its new baby as soon as 2010 in the US, making an international debut. Its potential rival, <a href="http://www.usnews.com/blogs/fresh-greens/2008/12/18/chevy-volt-plant-construction-delayed.html">the Chevy Volt is delayed</a>, but one hope it is not delayed for too long :
    <br style="clear:both" /> The Chevrolet Volt is priced at US$40,000 twice as much as the BY F3DM.
    </p>
     
    <blockquote>
    <p>A big part of what made the Volt notable is that it is ahead of the curve. If it becomes just another plug-in hybrid, the benefits to GM will be much smaller</p>
    </blockquote>

  3. #3
    Membre émérite Avatar de Erwan31
    Profil pro
    Inscrit en
    Février 2008
    Messages
    2 177
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2008
    Messages : 2 177
    Points : 2 444
    Points
    2 444
    Par défaut
    Bonsoir,
    ça vient du float:left de tes paragraphes.
    Tu as déclaré p {float:left}, ce qui est très dangereux puisque le flottement s'applique à tous tes paragraphes.
    Le paragraphe précédent le blockquote est flottant et donc il est sorti du flux normal vis à vis des éléments de blocs adjacents, en l'occurrence ici le blockquote qui remonte au niveau du premier élément précédent en flux normal, c-à-d le h2.
    Le blockquote est donc situé juste au dessous du h2 et son paragraphe au dessous du paragraphe introduit par le h2.

  4. #4
    Membre régulier
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    179
    Détails du profil
    Informations personnelles :
    Localisation : France, Haute Garonne (Midi Pyrénées)

    Informations forums :
    Inscription : Mai 2006
    Messages : 179
    Points : 117
    Points
    117
    Par défaut
    Merci à vous deux.

Discussions similaires

  1. [VB.NET] Comment envoyer du texte enrichi(couleurs,style...)
    Par fdiedler dans le forum Windows Forms
    Réponses: 14
    Dernier message: 17/03/2005, 14h49
  2. [VB.NET] Comment envoyer un texte modifié(couleurs,style...)
    Par fdiedler dans le forum Windows Forms
    Réponses: 8
    Dernier message: 14/03/2005, 18h11
  3. Comment appliquer un style CSS ?
    Par adameteve dans le forum Mise en page CSS
    Réponses: 8
    Dernier message: 10/03/2005, 21h52
  4. Comment utiliser les styles XP avec Dev-C++?
    Par abraxas dans le forum Dev-C++
    Réponses: 3
    Dernier message: 05/10/2003, 19h47
  5. Comment créer un menu popup style XP ?
    Par chaours dans le forum Composants VCL
    Réponses: 4
    Dernier message: 29/09/2003, 09h38

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo