Jan
06
This has been something that has plagued me for a while now: dynamic stylesheets. What is the purpose? Well. sometimes it would just be nice if you could create IDs and classes on the fly, and not have to update the stylesheet every single time you do something.
As an example, say you want all the Pages on your blog to look different, so you have the body tag dynamically generate an ID for every page, using the pagename. But the stylesheet - well… every time you want some kind of different layout, you have to manually edit the stylesheet. Wouldn’t it be nice if you could just have it happen when you created the Page?
read more »
May
05
Well, I haven’t caught his name yet, but I found a fellow “give something back” person who has provided me with some great information. Because if his assistance, I wanted to offer up a small amount to him via a link. So if you’re looking for more WordPress and ZenCart stuff, and can’t find it here (which is very possible, as I’m pretty small right now!), then feel free to look at the goodies “andrabr” has to serve up. There’s a lot of goodness over there, and I’m getting ready to dive in. I found him via this conversation on integrating WordPress with ZenCart. Very nice.
I also wanted to share a nice little plugin I wrote tonight. It’s probably my first “official” one, and I’m sure it needs to be cleaned up. I’ll probably play with it more.
Anyway, someone on one of the lists I’m on is trying to get a dynamic stylesheet to work with WordPress. She has a client who needs a different background image to show up depending on what page you’re on. Normally, you’d simply accomplish something like this just by using typical WP stuff:
<php if(is_page('1')) { ?>
do stuff for page ID #1
<?php } ?>
However, the client needs to maintain themselves, and if they ever add or delete a page in the future, they would have no idea how to edit the code to get the new background to show up. (Or, if they did, they’d probably screw it up - or many other things could happen.) So she needed it to be as dynamic as possible. In a perfect world, the client would create a page, add in content, and upload an image (with the same name as the page), and it would be done.
Happily enough, I figured it out!
read more »
Aug
19
Have I ever mentioned how much I love a challenge? I love to play with CSS.
Anyway, there was a question on one of my email lists the other day, and I was sure I could accomplish it. Basically, someone wanted a site layout where it was your basic 3-column thing. Content in the center and two sidebars flanking it. Simple enough. But the trick was - they wanted the two sidebars to always have the same length as each other - no matter which one was the longest. The center content section would have nothing whatsoever to do with the length of the two sidebars. Oh, and no “faux columns” tricks, or javascript to be used.
Could this be done using straight up CSS? I thought so, but I could forsee some problems with it.
Wouldn’t you know it - I was right.
read more »