• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

How to make entire Div section clickable

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › How to make entire Div section clickable

This topic is: resolved

Tagged: Div, links

  • This topic has 6 replies, 2 voices, and was last updated 9 years, 1 month ago by MM.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • December 18, 2013 at 2:16 pm #80007
    MM
    Member

    I'm trying to figure out how to make an entire div section clickable, including when on hover

    pls see http://www.hoteliyo.com and scroll down to the 4 boxes. I've only managed to get the text clickable

    Is there a way to change the CSS to make the entire box clickable, or some other way in the widget?

    Thks!

    http://hoteliyo.com
    December 18, 2013 at 3:37 pm #80025
    chrisrouse
    Member

    What are you using to create the boxes?

    December 18, 2013 at 3:43 pm #80028
    MM
    Member

    Thks Chris. I'm using css and then a widget section.

    CSS

    #quadbox :hover {
    	background-color: #F2F2F2;
    
    }
    
    #quadbox {
        background: none repeat scroll 0 0 #FFFFFF;
        border: 1px solid #DDDDDD;
        display: block;
        float: left;
        height: 220px;
        list-style: none outside none;
        margin: 0 1%;
        position: relative;
        text-align: center;
        transition: all 0.1s ease-in-out 0s;
        width: 96%;
    
    }

    And the widget entry:

    <div id="quadbox">
    <center>
    <br>
    <br>
    <center><i class="icon-building icon-4x" style="color:#0274BE;"></i></center>
    <br>
    <a href="http://hoteliyo.com/hotel-assets" style="font-size:20px;font-weight:700;color:#000000;">Hotel Assets</a>
    <br>
    <br>
    <br>
    <br>
    </center>
    </div>
    <br>
    <br>
    December 18, 2013 at 4:09 pm #80036
    chrisrouse
    Member

    Two options that should work. You can either wrap the entire div in a link, or you can wrap the content of the div in the link. Right now you're only making the text the link, so you would need to expand that. When I tested it on JSFiddle, I had to remove the height value to make the hover work properly, so you may need to play around with your CSS a little bit more.

    December 18, 2013 at 4:31 pm #80046
    MM
    Member

    Cheers Chris. Never seen JSFiddle, interesting.

    Still figuring how to wrap a div in a link or wrap the content....

    December 18, 2013 at 4:33 pm #80048
    chrisrouse
    Member

    Here you go. You can see where I moved your link to. In this example, I used <div><link>Content</link></div>

    http://jsfiddle.net/56ZA6/

    December 18, 2013 at 4:42 pm #80051
    MM
    Member

    Rockstar Chris - that lesson will be very useful. Cheers

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble