Welcome to TalkGraphics.com
Page 1 of 3 123 LastLast
Results 1 to 10 of 22
  1. #1
    Join Date
    Nov 2021
    Location
    Germany / Hessen
    Posts
    23

    Default Hover activates color field in the back

    Hello,
    is there a way to define an area in mouse-off, when one is hover over it, in the back a color-field appears ?
    To better explain what I mean, you may want to check the following website I found https://charmingplaces.de/reiseziele/

    When you hove over the small-pictures (not the banner) and the text, a color-field in the back appears.
    This happens, no matter whether a link is set in this area or not.

    I tried with pop-up layer, but it appears on-top for sure and not in the back. I could copy-exact the entire objects in the pop-up layer and add the colorfield, but this means more laoding work for the page.

    Ciao,
    ICH

  2. #2
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Lightbulb Re: Hover activates color field in the back

    ich, try this: CSS - Hover under.xar

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  3. #3
    Join Date
    Nov 2021
    Location
    Germany / Hessen
    Posts
    23

    Default Re: Hover activates color field in the back

    Quote Originally Posted by Acorn View Post
    ich, try this: CSS - Hover under.xar

    Acorn
    THX, I will try it and let U know

  4. #4
    Join Date
    Nov 2021
    Location
    Germany / Hessen
    Posts
    23

    Default Re: Hover activates color field in the back

    Quote Originally Posted by ich View Post
    THX, I will try it and let U know
    It works perfectly.
    THX !!!

  5. #5
    Join Date
    Nov 2021
    Location
    Germany / Hessen
    Posts
    23

    Default Re: Hover activates color field in the back

    Hello Acorn,
    I come back to this topic, with the following obseravtion.
    Your example works in such a way that as soon as you hover over the area, the colored background appears. But that only works if the hover area is a link. As soon as no link is stored, the colored background does not appear even when hovering. It's different in the original example website, there the colored background always appears as soon as you hover over, regardless of whether a link is stored or not.
    Why is this an finer solution?
    One could use a "fake link" everywhere as an activator for the color field.
    The problem with this is that the cursor changes shape when you hover over a link, implying a possible action for the viewer there. If the whole field is a link, the cursor is always a pointer.
    The original website https://charmingplaces.de/reiseziele/shows the colored background field always once you hover, regardless of whether you have stored a link or no link. Take a look at the example page and hover over the text, it is not linked, the mouse remains original and the color field still appears. So I'm wondering, is it possible to refine your solution to that effect?

    THX, ICH

  6. #6
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Hover activates color field in the back

    ich, invoking the MouseOver layer objects requires a link. You can use a "fake link". I call mine dummy links as they do nothing other than add an a <tag> into the design, allowing the MouseOver to show. Xara uses this approach in a lot of places. I set mine to be 'javascript: ;', the extra space tells me I did it and not Xara.

    You original example site uses tons of JavaScript o handle all this but is is excessive.

    I have managed to deliver what you ask for in two lines of CSS:
    Code:
    <style>
    .underlay { z-index: -1; }
    .default, .underlay { cursor: default; }
    </style>
    You need to add in a couple of ClassNames (underlay, default) and dummy links where real ones are not used.

    CSS - Hover under - enhanced.xar

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  7. #7
    Join Date
    Nov 2021
    Location
    Germany / Hessen
    Posts
    23

    Default Re: Hover activates color field in the back

    Thank you very much.
    Got it and implemented it.

    ICH

  8. #8
    Join Date
    Apr 2018
    Location
    Barnes, London
    Posts
    952

    Default Re: Hover activates color field in the back

    @Acorn,

    Many thanks for the idea; I tried it out and it works well > https://initiostar.co.uk/demo/Underlay/

    You could build a template gallery with this idea, much the same as the original OP's reference site.
    Gary
    www.initiostar.co.uk


    Xara Designer Pro+ and Xara Designer Pro X 19.0.1.65946 DL x64 Feb 7 2023

  9. #9
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,822

    Default Re: Hover activates color field in the back

    Quote Originally Posted by Initiostar View Post
    @Acorn,
    Many thanks for the idea; I tried it out and it works well > https://initiostar.co.uk/demo/Underlay/
    You could build a template gallery with this idea, much the same as the original OP's reference site.
    Gary, thank you for promoting it.

    Since then, I have rebuilt the mechanism so that the object underneath is actually now underneath. All the items on top has a pass-through effect - the pointer fails to trigger on moving over them.
    The object underneath is then triggered to show itself.

    The original was messy for movements between top objects and you could get a quick fade-in-out, which annoyed me.
    This approach is rock steady.

    The problem then is <a> Tags (Links, pop-ups, Highslide) cannot be triggered.
    The simplest is to remove the 'pass-through-' ClassName so the hover disappears.
    I have included a specific <a> Tag for text Links so the hover is forced off for these. It is a smart way to show something has changed.

    It is more versatile and does not rely too much on Xara coding.

    CSS - Pass-through Hover.xar

    Acorn
    Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
    When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat

  10. #10
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,917

    Default Re: Hover activates color field in the back

    Testing that on FF shows no page content Acorn. All okay on other browsers.
    Egg

    Intel i7 - 4790K Quad Core + 16 GB Ram + NVIDIA Geforce GTX 1660 Graphics Card + MSI Optix Mag321 Curv monitor
    + Samsung 970 EVO Plus 500GB SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

 

 

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •