Welcome to TalkGraphics.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,860

    Lightbulb CSS - Sticky Off-Page Items

    In https://www.talkgraphics.com/showthr...on-the-outside, I pointed out a way of making elements that were Sticky and off the design page not to stick to the right edge of the browser , regardless of the browser width.

    In CSS - Sticky Offsets.xar, I have simplified it to two specific user stories - off to the almost left and off to the almost right.
    The diagonal Red line has a link to an Anchor, foot, placed at the page bottom to allow simple testing.

    The top and bottom options are met in Xara already by:
    Top - setting the element to be Sticky and moving it down from the top of the design page (trivial).
    Bottom - setting the element to be Sticky and moving it up from the bottom of the design page (uses Autofit to Page > Bottom).
    The elements are on the design page.

    L&R are different as they are off-page and the Xara off-page capability only sticks them to the browser edge.
    To offset:
    Left - give the element(s) a ClassName of 'upLeft' - Name > hrtmlclass="upLeft"
    Right - give the element(s) a ClassName of 'upRight' - Name > hrtmlclass="upRight"
    Include CSS in Website Head:
    <style>
    .xr_stickie:has( .upRight ) {
    right: 20px !important;
    }
    .xr_stickie:has( .upLeft ) {
    left: 20px !important;
    }
    </style>
    If you want a different indent, alter the gap sizes shown in Red above.

    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

  2. #2
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,926

    Default Re: CSS - Sticky Off-Page Items

    Sweet solution Acorn.
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    21,926

    Default Re: CSS - Sticky Off-Page Items

    If you want a different indent, alter the gap sizes shown in Red above.
    altering this doesn't seem to have any effect Acorn?
    Egg

    Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor
    + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host

  4. #4
    Join Date
    Apr 2012
    Location
    SW England
    Posts
    17,860

    Default Re: CSS - Sticky Off-Page Items

    Quote Originally Posted by Egg Bramhill View Post
    altering this doesn't seem to have any effect Acorn?
    Egg, :has() needs to be enabled in FFv120. At v121 onwards, it is supported.

    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

 

 

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
  •