Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

CSS - Hiding images

Featured Replies

Hi, I'm creating a lightbox with information in when a link is pressed, but when I press the link the thumbnails from a little slideshow seem to get in the way. I've tried using display:none; when the lightbox is active, but I can't seem to get it to work, for example;

 

HTML

		<div><a href="#6" class="cross-link"><img src="images/tempphoto-6thumb.jpg" class="nav-thumb" alt="temp-thumb" id="white_content" /></a></div>

 

CSS

.white_content:active  {
    display:none
}

 

Well, you can see what happens here;

http://client.tubebackgrounds.co.uk/thc/custom/

 

(Click the "Contact Us" button)

 

Any help would be really appreciated!

Best regards

John

 

Edit - just tried this

 

.white_contect .active-thumb:active	{
display:none
}

 

I don't even know if I have the code correct!

Edited by Tweezy

  • Author

Ok good news, I managed it using javascript (But only when using images) I can't seem to get it to work just using text;

 

<li><a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';" onclick ="javascript:hideImage()">Wipepod</a></li>

 

Doesn't hide the image :( I actually get an error stating "Duplicate attributes" how can I "merge" them?

 

I tried this;

 

<li><a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block';document.getElementById('hideme').style.display='hidden'" >Wipepod</a></li>

 

Still no anvil :(

 

Edit:

Changes the "hidden" to "none" seems to be hiding the images!

 

Edit:

Somehow I managed to sort it all out... Wow.

Edited by Tweezy

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.