- This topic is empty.
-
AuthorPosts
-
June 10, 2014 at 6:04 pm #172356jakecouryParticipant
Hi I installed this theme a bit ago and was wondering if anyone would know how to put descriptions of my different links when you hover over them..
Here’s where I would want the hovering text to be.
http://i1239.photobucket.com/albums/ff519/Jake_Coury/ScreenShot2014-06-10at54437PM.pngHere’s my blog:
finally-focused.tumblr.comJune 11, 2014 at 3:43 am #172379Paulie_DMemberFirstly there is no text inside the links so you would have to add that.
This is the current structure (example)
<a href="ask"><img src="[snipped]message.png" width="20px;"></a>
See..no text
so you would have to change each one to something like
<a href="ask"><img src="[snipped]message.png" width="20px;">Insert Text Here</a>
Then we can start on the actual positioning.
June 11, 2014 at 2:46 pm #172461jakecouryParticipantOkay I’ve just finished doing that
http://finally-focused.tumblr.com/June 12, 2014 at 2:12 am #172516Paulie_DMemberOK…cool.
Oops…my apologies. I should have said put those words in a
<span>
tag.<a href="ask"><img src="[snipped]"><span>Insert Text Here<span></a>
You should also give each link an individual class but try to use something that can be repeatable but specific so.
class="link- ask"
,class="link-photos"
and so on.<a class="link-ask" href="ask"><img src="[snipped]"><span>Ask<span></a>
<a class="link-photos" href="ask"><img src="[snipped]"><span>Photos<span></a>
Get the idea?
Then add this
[class^="link-"] { position:relative; }
June 12, 2014 at 2:40 am #172518Paulie_DMemberFrom there we need to make the spans disappear and set up a new position for them.
Generically we do that by adding
[class*="link-"] span { position: absolute; display: none; }
Then we can position each item individually by using the class assigned..like so
.link-ask span { top:150%; left:-50%; } .link-photos span { top:150%; left:0%; } .link-email span { top:150%; left:50%; }
Then we need to tell the text to show up when we hover each link, like so
[class^="link-"]:hover span { display: inline-block; }
You can play with the individual numbers as you wish but it should look a little like this:
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.