Image En Ligne Avec du Texte HTML CSS
Excuses encore nouveau pour tout cela. Je suis en création d'une page web et de disposer d'une image et de texte à côté de l'autre, dans deux div. J'ai réussi à les amener là où je veux sur la page, mais quand je le redimensionnement de la page, le texte est redimensionné, cependant, l'image n'est pas. Je veux que le fond du texte à la ligne avec le bas de l'image à tout moment.
Toute aide appréciée! Voici le code:
<head>
<title>Stefano Mocini</title>
<link href='http://fonts.googleapis.com/css?family=Milonga' rel='stylesheet' type='text/css'>
<link href='styles/style.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div id="title">
Stefano Mocini
</div>
<div id="decal">
<div id="image">
<img src="images/tree.png" alt="tree" width="600" height="900">
</div>
</div>
<div id="about">
<p>THANK YOU SO MUCH FOR YOUR REVIEWS; YOUR DONATION AND FOR SHARING MY MUSIC!!!</p>
<p>About me: I started made music when I was only 6, because in the computer there was installed fruity loops, and I used it like a game. but i soon started to try to reproduce what i listened in the radio, so, step by step, i started to learn how to use this softwer. After i started to play the keyboard, that I received like christmast gift. One day I listened to "Back to life" from Allevi, and I loved it so much that I started to play the piano, every day. Step by step i learned how to make music, and how music is made . So now i can use the softwer whereby I played whan i was a child to make my own music. What kind of music should I make? Simply the one that I like!</p>
<p>You can use my music for making non-commercial videos or projects, but please put the title of the song and the author in the description otf the video or in the credits of the video.</p>
<p>Commercial use of my music: by the PRO license, or contact me</p>
</div>
</body>
body {
font-family: 'Milonga', cursive;
}
#title {
font-size:72pt;
text-align:center;
}
#decal {
float:left;
width:50%;
float:left;
height:80%;
}
#image {
margin-top:60%;
}
#about {
font-size:24pt;
float:left;
width:50%;
padding-top:5%;
height:80%;
}
Pouvez-vous fournir une démonstration en ligne ou en créer un à l'adresse JSFIDDLE
il a déjà publié son code, il suffit de faire le violon vous-même
il a déjà publié son code, il suffit de faire le violon vous-même
OriginalL'auteur k.s | 2013-06-06
Vous devez vous connecter pour publier un commentaire.
@Sourabh est proche. Mais vous feriez mieux d'utiliser
display:inline-block
au lieu defloat
et l'utilisationvertical-align:bottom
pour aligner le fond.CSS
Exemple: http://jsfiddle.net/ajdQa/
inline-block
n'a pas frappé mon esprit.+1
🙂est maintenant mon go-to maintenant, au lieu de flotteurs. Si rien d'autre, c'est non clearfixes
OriginalL'auteur Jon P
user2458195
est droit. Mais ajouter la largeur de CSS au lieu d'utiliserwidth
attribut.Case
Plein Écran
CSS
OriginalL'auteur Sourabh
veuillez vous rendre balise img width=100% qui s'adapte à décalque div même sur redimensionner et ajouter px de hauteur
OriginalL'auteur Prakash R