Posted on Leave a comment

Validating script elements in XHTML

I’ve found that multiple errors will come from within any [script] tags that I have. To solve this, use
CDATA as so:

[script]
< ! [ CDATA [

** Please note that you should not have your
characters spaced as I've done above, this is
because my blogger editor doesn't
like angle brackets!!

function thisDoesntMatter(a,b)
{
if (a < b && a < 0) then { return 1 } } ]]>

Above is the closing tag for your CDATA

[/script]

On another note, if you are having issues with chacters within links being validated, make sure your & signs are using the ASCII code and not just the & symbol.

Posted on 1 Comment

CSS : Stretch sidebar full height of the page

One of the first things I needed to figure out is how to have the sidebar colour or pattern stretch to line up with the length of the content. I’ve found the best way to do this is to initially create a background image showing a segment of the width of your site like this:
(This image would repeat vertically, with the white bit as my content area and the coloured bit on the right as my sidebar)

Then set up your sidebar and content area within the y-axis repeating background div. This way, the content will stretch down and cause the background to repeat, forcing the sidebar colour to also extend.

See below for a quick code example:

First, the CSS to show the bg image and the content areas:

#full_content {
background-image:url(../images/framework/page_bg_tile.jpg);
background-repeat:repeat-y;
margin: 0 auto;
width: 708px;
}

#side_bar {
float:right;
text-align:left;
width: 210px;
}

#main_area {
float:left;
margin: 10px auto;
text-align:left;
width: 670px;
}

Now the div’s to organise your content

<div class=”full_content”>

<div class=”side_bar”>
Sidebar content in here
</div>

<div class=”main_area”>
Main area text
</div>

</div>

Posted on Leave a comment

(Seemingly) Unexplained alignment problems

In one of the recent sites I’ve been working on, I found that a bit in the sidebar wasn’t applying the appropriate css and pushed the site out further, leaving a little gap. After trying different css tricks I found that the true problem was this:

[!– Run on view –]

A comment which gets put above the doctype after our cms system includes certain files. I took that stubborn comment out and the alignment problem is fixed.

Posted on Leave a comment

OFFF Barcelona 2006

I just got back from the 3 day conference in Barcelona. They held it in the CCCB (Centre de Cultura Contemporània de Barcelona) which seemed to do quite well for most of the presentations. It was really good to see all the talent, and very inspiring for me to try a little experimenting myself. I’ve taken some video of the conference, as well as a little bit of ‘tourist’ view, I’ll post that once I’ve got a chance to do a little video editing.