Streaming live at 10am (PST)

How do I create a div id rather than class


#1

Am I missing something obvious - all styling makes a class [ . ] which is fine for most things - but how do I create a unique id [ # ] in the stylesheets?


#2

In the stylesheet directly using webflow - you can't. That's what classes are for. You can add custom style inside the <head></head> tags in the site dashboard - custom code. simply use

<style>
 #something {
  color: red;
 }
</style>


#3

Thanks, I did it by tweaking the css afterwards, I'd rather do it that way, it's tidier than having styles in the head of each page. I just wondered if I had missed something obvious.
Your jquery toggle implementation worked a treat once I had tweaked the CSS.
Thanks for all your help.


#4

You might also like to check out http://csslint.net/

Also:

https://github.com/stubbornella/csslint/wiki/Rules

https://github.com/stubbornella/csslint/wiki/Disallow-IDs-in-selectors

The logic behind their guidelines recently compelled me to drop all use of IDs (except for use with javascript) and use only classes instead.


#5