2017-09-02 24 views
0

Das Problem, das ich habe, ist Text auf der linken Seite eines Bildes setzen ...Aligning Text neben einem Bild (links)

HTML & CSS

h2, social-hand { 
 
    font-family: 'PT Sans', sans-serif; 
 
    display: inline; 
 
    float: left; 
 
    margin-left: 95px; 
 
} 
 
    
 
p { 
 
    float: left; 
 
    margin-left: 95px; 
 
    margin-right: 400px; 
 
    margin-bottom: 20px; 
 
    margin-top: 50px; 
 
    position: absolute;  
 
    text-align: left; 
 
    display: inline; 
 
    font-family: 'PT Sans', sans-serif; 
 
}
<div class="social-hand"><img src="social-hand.jpg"> 
 
    <h2><big>Tittle Text</big></h2> 
 
    </div> 
 
    <p>Example Text <a href="About.html">Read More ></a> 
 
    </p>

And this is the result I'm getting...

Jede Hilfe wäre toll!

+0

Hallo, der Text genau würden Sie auf der linken Seite des Bildes angezeigt werden möchten? –

+0

Versuchen Sie mit display: block; stattdessen – Xedret

Antwort

0

bearbeiten Sie den Code wie folgt:

h2, social-hand { 
font-family: 'PT Sans', sans-serif; 
display: inline; 
margin-left: 95px; 
} 

.social-hand img{ 
float: right; 
margin: 0 0 10px 10px; 
} 

p { 
margin-left: 95px; 
margin-right: 400px; 
margin-bottom: 20px; 
margin-top: 50px; 
position: absolute;  
text-align: left; 
display: inline; 
font-family: 'PT Sans', sans-serif; 
} 

Hoffe, es hilft.

+0

Vielen Dank – Gartty101

0

Versuchen Block mit Display statt:

h2, social-hand { 
 
    font-family: 'PT Sans', sans-serif; 
 
    display: block; 
 
    float: left; 
 
    margin-left: 95px; 
 
} 
 
    
 
p { 
 
    margin-left: 95px; 
 
    margin-right: 400px; 
 
    margin-bottom: 20px; 
 
    margin-top: 50px;  
 
    text-align: left; 
 
    display: block; 
 
    float: right; 
 
    font-family: 'PT Sans', sans-serif; 
 
}
<div class="social-hand"><img src="http://via.placeholder.com/350x150"> 
 
    <h2><big>Tittle Text</big></h2> 
 
    </div> 
 
    <p>Example Text <a href="About.html">Read More ></a> 
 
    </p>

+0

Vielen Dank – Gartty101