PDA

View Full Version : Css fixed pressed state


africano
03-31-2009, 09:50 PM
This question is for a friend of mine:

Hes programming a part of a site which shows dynamic content from a website. The buttons(all done in css) filter the results, so when he clicks media courses, all media courses show up.

How can he make it so that when a user clicks a button that buttons state changes and stays highlighted(for example) so that the user knows which results hes seeing?

No images...pure css?

Any help much apreciated...Oh and HI! Ive been and Iam very busy(with other work not web related unfortunately so even thought Im not posting I still read the forum! Miss it!

Cheers

coloeagle
04-01-2009, 12:28 AM
Are you talking about a visited link change or a current page change similar to what I have on my hobby site?

africano
04-01-2009, 06:40 AM
Im talking about when a user clicks a button to filter the results from a databse that button(css)changes its state to pressed and stays like that to show the user what results they are seeing.

So if I want to see maths results: I click maths results and the button(gree) turns dark green and stays that way.

coloeagle
04-01-2009, 07:09 AM
Sounds like you are after a current page link style. This can be done with php and js. Difficult to say which way would be best for you. Is the dynamic content php driven?

To style the link to look like a button with css and not images you would assign a border style,
outset to give a raised button look and inset to give the look of a pressed button.
Set the width of the border for your desired effect.