Tag: CSS

Home / CSS
Post

How to center HTML element with absolute positioning

Believe it or not, something like this will do: [crayon-594ced5b28e80248423299/] You can also center the content using text-align. Now as for width, some say that it is required, but in many cases I didn’t see any difference (I guess this is dependent on the browser). And you’re encouraged to add max-width combined with width:100% values.

Post

Purging a stubborn WP Engine CSS cache

Here is the scenario – you created that awesome CSS and are dying to get it online. The client also. The website is hosted on WP Engine and is using its famous aggressive caching mechanism. You save the changes into style.css or elsewhere and clear the cache. But you still see the old style.css. You do it again...

by 13. September 2016.2. March 2017.
Post

Sass Quickstart

First things first – I use SCSS Syntax. Also, you need a compiler – I use NetBeans (Koala is also good). But these are for Windows users just like myself – I have no doubts that for Linux users, there are much more powerful solutions :-).

Post

How to add custom CSS class depending on the template

I know that you can achieve the same by using global variables, but this is also one of the ways to add custom class depending on which page template has been loaded (you would add this into functions.php): [crayon-594ced5b298a9940959795/]

Post

How to highlight parent menu item when hovering over submenu item

If CSS on your website works in a way where when hovering over any of the subitems, the main item loses the highlight (hover state), you could try using the following CSS: [crayon-594ced5b29a0d492332601/] Needless to say, it is up to you which styles to choose, but make sure that the ID (or class) matches the...

Post

Glowing HTML button with jQuery

There are certainly better ways to create a glowing button, but here is one simple way I used on one of my clients’ websites. The request was to create a rounded button with glowing effect. In other words, I wasn’t able to use CSS3 infinite animations because none of them were suitable for that. Naturally,...