Forums

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

Home Forums CSS Hi: ) Need help with making an "elastic" div

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

    Hi all, I’m new here, great community: )

    I wonder if anyone could help me with this. I have a WordPress site in which I am using a plugin called Show-Hide/Collapse-Expand. The plugin is similar to Colllapsomatic, it shows a hidden text when triggered by clicking a link.

    The plugin works well but I’m trying to get the hidden text to appear within an elastic boxed div with a black border. What I want is to have the “Read More” and “Read Less” links to be boxed tight with the black border near the links and when clicked to show the hidden text I want the boxed div to get wider to fit the text. In short, I want an elastic effect with a black border.

    Right now the boxed div I have works but it stays at the same width size when clicked it only changes in height. I wish I can make it to change the width automatically, to get wider to fit more text.

    Any help will be appreciated it.

    Here’s the CSS code I have so far:

    https://codepen.io/Paulatea/pen/WzqLQN

    #269867
    Mamun
    Participant

    If you have a fixed width, how will it change the width automatically? You have to change the width to auto on click event.

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