css display none issue

This topic contains 3 replies, has 2 voices, and was last updated by  Guust 7 years, 7 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #393004

    D P
    Expired Member
    Post count: 24

    Hello

    For some reason when i put {display:none} on some elements it hides the element from view but leaves the space that the element filled on the page, so I now have big gaps on the site.

    What is the best way to resolve this?

    Adjust padding? Or is there an alternative to {display:none}

    Many thanks

    #393005

    Guust
    Moderator
    Post count: 29970

    All depends a bit. You may need to target the next element up, maybe you are targeting the wrong one.
    Or you see if “visibility” is the right one.
    https://www.w3schools.com/cssref/pr_class_visibility.asp

    But like I said, it depends exactly on what and where you are trying to do it …

    #393006

    D P
    Expired Member
    Post count: 24

    Thanks Guust

    It appears that I was taking out the individual elements rather than the container/group of elements if that makes sense.

    #393007

    Guust
    Moderator
    Post count: 29970

    Makes sense, that was what I trying to say with “You may need to target the next element up” 🙂

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount