Blog Entry #5 - A headache of sorts

January 7, 2009

I'm on a roll with this lately, just throwing out entries left, right and center here.
I felt like there was a big enough change to the site to warrant a post about it, because new people might not know what it was like before now.


What I spent the last 2 and a half days (sort of) working on has been the fixed panel on the side. It was more of a headache to get working than anything else, really... Since I don't know CSS that much, it was like feeling around in the dark for a foothold. I got some help from The Private Computer Forum on Nexopia.com, but they weren't much help, so I asked a forum admin on AnimeVector.org and he pointed me in the right direction with the use of "position: fixed;" in the CSS. This allowed me to set the panel on the right to "slide" down the page when you scroll. But really, the panel is just fixed in that position on screen at all time.
When I first put the code in, the panel jumped over to the left side of the page and was covering up my blog entries. I had a really fun time trying to debug where I went wrong with that.
In the end, I did a work-around with it. Currently, my code is set up so the div class is defined in the viewed page's code, and then I call an outside .PHP file for the panel, called "categories.php" with all the panel's content inside that. I then created a new CSS class and defined what is in that "categories.php" file to be formatted with that new class. If I wasn't calling the outside file, the code would look like this:

<div class="right">
<div class="newClass">
*content*
</div>
</div>

So I'm throwing two different classes onto it right after the other. The "right" class is setting one div to be positioned at X and Y, and then the "newClass" is telling the content to behave in this manner. It may not be the best solution to this problem, but it's fully functional and satisfactoy from where I'm sitting.

-tk

PS, I've added a review for the anime Kannagi.

Share |
v13.26.34