2016-12-21 3 views
0

Ich habe versucht, den Code von links und rechts schweben und auch von links und rechts, aber es bleibt nicht in der gleichen Zeile wie Text oder das Schweben Bild ist oben das andere. Ich bin irgendwie verwirrt, was ich falsch mache, könnt ihr mir vielleicht helfen?Setzen Sie HTML Hover auf rechts und fügen Sie Text auf der rechten Seite

JsFiddle: http://jsfiddle.net/W3Pxv/344/

<span class="right"><a href="http://discord.me/animalcrossingchat"><img src="http://i.imgur.com/1HcjGUB.png?1" onmouseover="this.src='http://i.imgur.com/Y3qUfNt.png?1'" onmouseout="this.src='http://i.imgur.com/1HcjGUB.png?1'" /></a></span><span class="left">Animal Crossing Community gives you an unlimited amount of possibilities. Do you want to share some unforgettable moments of your own animal crossing experience or just talk about anything noteworthy that comes to your mind on our plaza? Why don't you grab a cup of coffee and talk about more serious matters in the roost? Become a premium member and enjoy a variety of new features and much more. 

Be part of our community by earning bells, answering the question of the day or winning valuable prices on our server's contests. You are what you make yourself to be on Animal Crossing Community. Join today and become the newest member.</span> 

Css:

.right { 
    float:right; 
} 

.left { 
    float:left; 
} 
+0

put in der richtigen jfiddle, meine schlecht. –

+1

Es ist schwer zu verstehen, was Sie erreichen möchten. Möchten Sie das Bild auf einer Seite und Text in einem anderen als im Gegensatz zu einem anderen so wie es jetzt ist? –

+1

Bitte formatieren Sie Ihren Code richtig - es ist schwer zu lesen – ochi

Antwort

2

.left Gib eine Anzeige von Inline-Block und eine feste Breite.

Wie so:

.left{ 
    width: 420px; // size is interchangable 
    display: inline-block; 
    float:left; 
} 

Fiddle: http://jsfiddle.net/W3Pxv/348/

+0

Perfekt, danke! –

+0

@AntonioVallez bitte markieren Sie als behoben Ihr Problem, wenn es Ihnen geholfen hat :) –

Verwandte Themen