Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

html&css help. displaying information based on which link is clicked.

hi, so i'm working on my friends portfolio page for his art. i didn't find much information about this on google (maybe i just didn't explain it good enough), so i'm hoping on the community of treehouse.

i've created a beautiful gallery. what i need, is: when i click on any of the pictures it should display a larger picture and also some extra information about it on the side. all the other pictures of the gallery should shift. what i am looking for is kind of like google images.

i also need switch the gallery according to either a b&w or colored link in the menu is active.

can i do all of this by just using html and css or do i need javascript (cause i haven't started learning it jet)

this is a single page layout.

so if anybody can direct me to a source of information, that would help.

1 Answer

Hi Carl - as far as I am aware for this you would need to use Javascript as the css/html cannot be affected by a 'click' (or maybe its just much easier with Javascript).

The only css that springs to mind is maybe you could make use of the :focus attribute to show a modal display value from :none to :block or similar - so also maybe check that out. As for the sorting based on a selected link - search for data filters and how to use them.

Hope this helps.