WordPress and Nth-child

I’m building a new personal website. The process has been educational and enlightening. I’m excited to have something new. I’ve built the design around a navigation tutorial from here.

You’ll notice the original nav tutorial uses nth-child and other selectors that don’t work in IE8 and lower (I decided my site should support IE8+). The site stayed that way until I was ready to browser test. After a couple hours of research and testing I realized that nth-child is a really useful tool but for those who want compatibility with IE8 and lower, it’s not a real option. Now I understand why there’s so much fuss about IE compatibility. In the end I switched nth-child to first/last where I could and then just used classes everywhere else. The transition was easy and even though I spent about three hours on the issue it was time well spent to learn the tradeoffs between new features and compatibility. Note: I stumbled on some JavaScript solutions that would fix some of the incompatibilities but I decided the added complexity wasn’t worth it. Classes worked great without using any fixes.

I’m in the process of learning how to build WordPress themes and I’m using my new site as a guinea pig. Instead of jumping right in. I decided to build the static site first and then build a theme around it. I’m not sure if this is how other people do it but I think it’s a good way to start.  Because my new site will showcase my work and serve as a blog I will be integrating custom fields and posts. I’m not sure how to do that yet but Treehouse has in depth tutorials.