Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can this be done with pure css? layer to appear when link is clicked

Status
Not open for further replies.
Jul 28, 2005
358
FR
Right, I don't know if this can be done or not but would appreciate it if anyone can point me in the right direction.

I want to have a list of categories on the left hand side of my page, that when one is clicked will cause a form to appear to the right of the categories. I would prefer to be able to do this using pure css, rather than any javascript etc.

I need this as I have a lot of info I need to collect and would like go split it into sections, just not sure where to start.

I'm not asking for a complete solution, just some advice to get me going.

Thanks,

Richard
 
You would need to use javascript as there is no way to detect and act on the click using CSS.

You would however use CSS to show/hide the layer. Again this would be done with javascript to dynamically change the style properties of the element.

There are good an bad ways to do the javascript too. Look to use unobtrusive javascript.
For instance, only hide the element if the browser supports javascript and make sure that the whole process will work for someone without javascript available. But I am guessing you already realise that kind of thing :)

<honk>*:O)</honk>
Foamcow Heavy Industries - Web site design in Cheltenham and Gloucester
Ham and Jam - British & Commonwealth forces mod for Half Life 2
 
Thanks for that. I suppose that is what I expected, now to work out how to implement it and get it working with javascript enabled and not!

Richard
 
yep, probably will have to do a detection at the start as I need to be able to get all the sections filled in that will be in the different links on the left.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top