Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Side banners on my website?

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #171026
    ckubs
    Participant

    Didn’t posted this in other section as I don’t know is CSS related or other.

    If I want to have side banner like in this screenshot om my website( wordpress) how can I achieve this?
    I can have something like clickable background image or to put banners with negative margins?

    #171030
    Atelierbram
    Participant

    Didn’t posted this in other section as I don’t know is CSS related or other.

    It is, which you could have seen if you were using Devtools/Firebug.

    how can I achieve this?

    They are just one image, used as a kind of inline-sprite-image (left-half, right half), in (two) absolute positioned link tags that are toggled visible/invisible with corresponding class-names in media-queries. The trick here is that the wrapper div has no position: relative declared, so the links are positioned to the next relative positioned element up the DOM tree, which is this inner-wrap.

    I can have something like clickable background image

    Here they are not background-images but just one inline image (in the HTML), but you can achieve this in CSS with the background-size property (with value) on the a element, as long as the wrapper is a <a href=""> link tag …

    Would like to advice to make a reduced test case of this, on your machine, or on Codepen , you can start out by making a copy of the Codepen I made with inline images, : you can fork it there and make it your own.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Other’ is closed to new topics and replies.