1 post
  • Has been a member for 1-2 years
worrrrrrk says

I’m starting to learn php and how to code wordpress themes.

So for images I’d like to use a popular effect which is a hover div on the photo which shows relevant info.

Here is an example theme which uses this effect: http://themeforest.net/item/super-grid-retina-ready-portfolio-blog/full_screen_preview/4097521

Normally I’d use a div that has a relative position and then within place the image and the hover with an absolute position and width and height of 100%.

So I have two questions:
  • 1. What’s the correct way to append the “hover” class to the image?
  • 2. What do most wp authors do if the user doesn’t want this effect? Do they apply this effect to only image type posts? what if the user wants to say insert an image thats not full width and have text wrap?
  • Thanks.
    82 posts
    • Bought between 100 and 499 items
    • Exclusive Author
    • Has been a member for 3-4 years
    • Sold between 10 000 and 50 000 dollars
    subwaymatch says

    1. Use jquery addClass. Or if you’re using HTML5, you can wrap the element with and use :hover property.

    2. Authors would allow users to turn them on/off on the admin panel.

    Hope this helps 8-)

    by
    by
    by
    by
    by
    by