Help - Search - Members - Calendar
Full Version: Image gallery
HTMLHelp Forums > Web Authoring > General Web Design
Hi, i have an image gallery on my HTML and CSS. It doesn't work as it is supposed to.

OK. And in what way doesn't it work as you want?
The bigger images must pop up when you click on the smaller ones.

In the CSS, the <span> sections must be hidden, with the property "visibility-hidden"
You've got the selectors wrong. You don't need to be this specific, but as you have it you need a space between the class names.

You have
.gallery.vignette span

and it should be like so.
.gallery. vignette span

That goes for the selector for the rule that shows the large image and for at least one more too.

What you want is a contextual AKA descendant selector. It consists of two or more singular selectors with a space between them.

div p span

The above would match any span that's inside any P that's inside any DIV.

I don't remember if what you wrote has an actual name, but it's sometimes called "chaining". It matches an element that has all listed classes. So with what you wrote the browser looks for something like this - and it isn't there.

<div class="gallery vignette">
It works with the space betwen class names!

Thank you very much!
Yup. I tried it. You are welcome. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2022 Invision Power Services, Inc.