Fun With CSS

For a change I got off my lazy mental ass and decided to learn how margins and padding work in CSS. Of course, this was partly procrasination from studying for a midterm I have on Thursday, but mostly it was because I realised that I had only designed one theme for this blog from scratch. All the rest are modifications of existing themes designed by someone else. It’s not necessarily a bad thing to have many like that. There are lots of amazing themes out there that I wouldn’t be able to design if my life depended on it. Mostly that’s because of javascript, which I haven’t bothered to learn yet. But still.

My favourite has got to be the Regulus theme designed by Ben from Binary Moon. Not only does it look good and have pretty much everything built in, but it also integrates into the WordPress admin panel so you can change the style without editing the code all the time. Not that I haven’t messed with the code lots anyway. I changed it to allow me to use more colour schemes than the ones it comes with, and attempted to add more header images. It turns out the code didn’t like two-digit values for that, so I had to replace the old ones with mine. The good news is that after doing that I can change the entire look of the site just by choosing a colour and image from the admin panel. ‘Tis very handy.

Anyway, back to the CSS fun. Since the library book I need is still out, I decided to just play around with the margin and padding values in my theme and see what happened. Personally I think I learned more doing that than I ever would have from reading a book. I learn a lot of things from books, but tend not to fully understand them until they’re put into practice. In this case I just skipped the book-reading step.

I wanted this theme to be easily viewable for people with resolutions of 800×600, since both Emile and Stephanie tend to use that one. They have old computers and it’s not like they really have a choice to be able to upgrade. I know it’s better to design with older hardware in mind, but I don’t usually care because up until a few months ago everyone that knew about this site had relatively new computers and used resolutions of 1024×768 or more. It looks good this way anyway, so whatever.

I’m rambling now, but the point is that I neglected review to learn something new and it was awesome. There’s still a couple kinks I need to work out with this theme (like the size of the comment form, it’s huge!) but all in all it looks good and is functional so I’m happy. If anyone can find out how the hell I styled the comment form before, I didn’t do it in the CSS (my bad) and I hate inline styles so it’s not in the comment.php file either, I’d really appreciate it. I know that it’s going to bug me until I find out.

EDIT: Okay, I figured it out. I realise now that I almost fixed it by accident last night, but the change made the page act weird so I left it at the time. All I needed to do was delete part of the comment code and then style the width. Simple.