Grow your CSS skills. Land your dream job.

Styling

but the parser didn’t like that.

# April 9, 2012 at 1:57 pm

So you want a dropdown so that users can change the font that they see on your website? Something like that?

Either way you’ll need to look into some PHP or JS.

You could do something similar to this, but change it from buttons to a select and font-size to font-family: http://stackoverflow.com/questions/891980/allow-users-to-change-font-size-in-a-webpage

# April 9, 2012 at 3:01 pm

Hi there,

I can do the PHP and JS, my question is the CSS!

If I do this:

Font:


The inline styling simply doesn’t work and I’m wondering if there is a way to style them without any excessive CSS classes.

# April 9, 2012 at 4:07 pm

Dropdown options can be styled…but it’s extremely limited. Colors are fine, font types are not. If you really need to style things, better avoid SELECT and OPTION and make a “fake” dropdown.

See http://jsfiddle.net/senff/bcQkN/1/ for an example of attempting to style a real dropdown, and a quick example of an HTML/CSS mock dropdown (which obviously needs a little more code behind it).

# April 9, 2012 at 10:11 pm

Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".