Hot to set an element’s CSS style using Javascript

Hot to set an element’s CSS style using Javascript

CSS is a great way to reduce the amount of markup that needs to be on a page. It also standardizes how your pages look and feel and should make it easier and quicker to add new content. But what happens if you have Javascript logic on your page and based off some user action, you want to change the appearance of an object? With Javascript, you can reference the object, then set the style equal to your desired new value. You can even change the...

Read More

Floating Elements with CSS

Floating elements used to be a huge deal when I started developing. What I mean by floating is that when you scroll down the page, the element scrolls with you, always maintaining the same position on your screen. The issue back in the day was that the scripts people offered to float elements down the page were choppy, laggy, and generally not pleasing to look at. Yes the content scrolled with you down the page, but it wasn’t a nice...

Read More