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

Thanks!
pandy
OK. And in what way doesn't it work as you want?
macugab
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"
pandy
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
CODE
.gallery.vignette span

and it should be like so.
CODE
.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.

CODE
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.

CODE
<div class="gallery vignette">
<span>...</span>
</div>
macugab
It works with the space betwen class names!

Thank you very much!
pandy
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-2021 Invision Power Services, Inc.