Posts for 04/2008

30 April 2008 - 14:15

The CSS italics bug in IE6

This one kept bugging me for quite a while. Working on a project with multiple pages with quotes in italics we bumped on several pages breaking the layout - of course in Internet Explorer 6 only, that was.
The issue occurred in a floated container when using italic text, typically jumping below the other content leaving a big gap, as clearly something in IE6 decided the width of the container wasn't convenient anymore.

I remember having met this problem before and having it solved then by slightly reducing the width of the quoted paragraphs and/or reducing the spacing between the characters slightly.
But not this time - pages kept on breaking either in enlarged or reduced font sizes, moreover in a completely unpredictably way, as this applied to some page but not to others.

I found this link on the italic bug on Position Is Everything, explaining the issue and suggestion some solutions... it didn't seem to work at first trials. But then in combination with an article on an old CSS discussion list I could apply the break through method with success:

  • you have to tell IE6 explicitely what it's supposed to do anyway by default: showing the overflow - so add overflow: visible to the (innermost) block element containing the italic text (the element whose width is going to be wrong)
  • also make sure that this element has any assigned (not auto) dimension

So this is where the essence becomes real simple:

#content {height:600px; overflow:visible;}
(0) Comments ·
27 April 2008 - 13:34

Nature’s magic

Not sure where this comes from originally, but a nice study of the wonderful relationship between food, foodcells, vegetables and our body and body cells. One of these messages going 'wild' on the internet - not many make it further down the road after landing in my mailbox, but there are 'exceptions' to this rule :-)
This one does it under the title 'clues'.

Clues

Carot A sliced Carrot looks like the human eye. The pupil, iris and radiating lines look just like the human eye... and yes, science now shows that carrots greatly enhance blood flow to and function of the eyes.

TomatoA Tomato has four chambers and is red. The heart is red and has four chambers. All of the research shows tomatoes are indeed pure heart and blood food.

[Read more on Nature’s magic...]
(0) Comments ·
06 April 2008 - 13:32

More on displaying special characters in your blog, like Expression Engine specific code

I've been tackling this topic for Html already , but just taking it a step further: how to add dynamic code, code with curly brackets and the like to your blog, in casu here Expression Engine?

Basically there seem to be 3 options:

Ascii conversion
  1. You can 'encode' special characters like curly brackets, rectangular brackets etc. by referring to their decimal ASCII value - you do so by typing an ampersand, hash and a number, followed by a semicolon: eg ']' stands for ]
  2. You can 'encode' special characters, curly brackets or code with 'character entities' - left curly bracket is '{' , right curly bracket is '}' - similar syntax as previous point
  3. In EE, you can wrap your code within the special code tag [code] your code [/code] - WITHOUT spaces - be very attentive not to use spaces within the rectangular brackets

You probably find this a useful 'ASCII Decimal Octal Hex Binary HTML Table' - more info on EE encoding at in this post. More ASCII tables on ascii-table.com, a great resource : they even have a 'conversion calculator"

And if you ever wondered about all the naming conventions for this ASCII characters: with joy a forward to the Pronunciation Guide, which solved a problem I had during courses for years how to address <> ? I asked more than one native English speaker, but I'm now happy to know it's called: Angel brackets

(0) Comments ·
05 April 2008 - 08:10

Expression Engine: counting items in categories without the query module php

If you want to count in Expression Engine - e.g. how many items you have in each categories - you're bound to use recordsets and probably need the Expression Engine's query module to help you generate the SQL and bridge the PHP .
This module is part of the paying version and actually enables easy generation of all kind of SQL queries, without you having to ponder about the integration with the PHP engine.

However: if you want to achieve things occasionally without using this module .... well the good news is you can: as I wanted to experiment to see what and what wasn't possible, I came to a solution which actually matches what I was after.

Count posts in EE

And that was something relatively simple actually: I just wanted to be able to show the number of posts in a categorie, when users click on one of the categories; and as I don't want the typically numbers of items after the categories (well not yet, I might change my mind - but it seems a bit pompuous at time :-) ) I decided to give this a go by writing the PHP myself.

[Read more on Expression Engine: counting items in categories without the query module php...]
(0) Comments ·
Page 1 of 1 pages