css - How to show tags on tumblr when you hover over a picture? -


i got new theme (http://soeststhemes.tumblr.com/casual) unfortunately doesn't show tags. i'd show tags when hover on image, know how on html? in blog: http://yixing.tumblr.com/ tags shows @ side when hover mouse on it

since theme doesn't have tags, you're going have add them in. take @ this useful guide tumblr has on creating custom themes.

first, need html structure. simple section tags: div box appearing if post has tags, link each tag separated space. must pasted after each instance of <div class="entry"> shows types of posts.

{block:hastags}  <div id="tags">   {block:tags}<a href="{tagurl}">{tag}</a>&nbsp;{/block:tags}   </div> {/block:hastags}     

now css makes appear , disappear upon hovering post, formatting it. should placed before {customcss} in html code, along theme's css. added lines make section more fluid theme.

#tags {       /* positions tags section */       position: absolute;       bottom: 0px;       left: 0px;       /* sets opacity 0 hide */       opacity: 0;       filter: alpha(opacity=0);       /* keeps tags section on */       z-index: 10;       /* extra: width same post width */       width: 100%;       /* extra: background colour */       background: white;       /* extra: smooth transition (same theme) */       -webkit-transition: 0.8s ease;       -moz-transition: 0.8s ease;       transition: 0.8s ease; }  /* when hovering on .entry #tags */ #entry:hover .tags {       /* opacity maximum show tags */       opacity: 1;       filter: alpha(opacity=100); } 

now it's case of tweaking css suit needs. can change values of top or left, or change them right or bottom. negative values allowed.

you can see example here using theme showed.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -