SimonCox.com

Version 6.4

relax with a cup of green tea

Shorticals

CSS first-child and IE

I was researching CSS first-child selectors this morning and discovered something new to me. For years my css has avoided first-child selectors because of compatability issues but actually this selctor works just fine in IE8 and below, but, and there is always a but with IE, only if you have a doctype declared - and who doesn’t do that these days? (Oh come on!) I also found that there is a bug where a comment is considered by IE as being the first child if it’s in that positon which can ruin you day but thats unliky to happen especially if you srtip comments from your production code as you should.

A good example of the code can be found at the W3C Schools site and they have a nice demo mode you can play with - http://www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_firstchild_more4
I probably did know this at some point in the past but suprised myself with it this morning - which was nice.
#somethingneweveyday.

by Simon Cox | 12 Jan 2012 |

You are invited to comment

You are invited to post comments about this article. I will publish any comments that I think actively further the conversation and I reserve the right to filter out any comments. Comments on this site are free for general discussion but not for promoting businesses. If you wish to link to a commercial business you are welcome to do so and there is a charge of £10.00 per link per day, payable in advance, with a minimum of 30 days. Enjoy the discussion.

Go on remember my info as I may be back one day

Let me know if anyone writes a reply comments?

What day comes two days before Thursday? (7 characters required)

Shorticles

Responsive Web Design break points

RWD Breakpoints are the topic of dicission at the moment - my thoughts.

Read more about Responsive Web Design break points...


CSS first-child and IE

Did you know you can use first-child in IE 8 and below?

Read more about CSS first-child and IE...


Aperture tidy up

Quick post: I spent some of the weekend tidying up my photos in Aperture.

Read more about Aperture tidy up...


ExpressionEngine custom log-in page

Just created my own customised EE login screen.

Read more about ExpressionEngine custom log-in page...


EEUK11 tweets from

EEUK11 twitter feed

Read more about EEUK11 tweets from...


EEcms tip - transfering site to a new server

Card handling fee?

EEcms tip - looping urls

End July image roll

Content strategies of pages with no content

ExpressionEngine Assets - changing images

When Google+ gets on ifthisthenthat

Big take away from Insites Tour Brighton

Ethan Marcotte’s Responsive Web Design

Actimel - excellent example of bad marketing practice

8 Faces Magazine

Preventing deep linking

Hyphens, dashes, endashes and emdashes v underscores

Main articles

Swanage Belle

Swanage Belle, A trip on a steam pulled train from London to the coast.

I recently booked a trip on the Swanage Belle, a steam hauled special from London down to Swanage on the Dorset Coast. 

Read more about Swanage Belle...


I never met Steve Jobs

I never met Steve Jobs, My thoughts and reflections on the influence of Steve Jobs on me.

Steve Jobs was many things to many people. To me he was one of a handful of people who have had a profound effect on my life.

Read more about I never met Steve Jobs...


EEUK11 report

EEUK11 report, The first ExpressionEngine conference in the UK

The UK's first ExpressionEngine conference has taken place in Manchester in August 2011. I provide a report on the event itself and the surrounding activities.

Read more about EEUK11 report...


Assets for ExpressionEngine

Assets for ExpressionEngine, Installing Pixel & Tonics new Assets add-on

Assets is a new file management add-on for ExpressionEngine and brings a new way of managing assets in your website. I installed it and built a simple image Gallery.

Read more about Assets for ExpressionEngine...


Vintage tractors

Vintage tractors, at the Shakey Super Pull

On the 11th June we attended the Shakey Super Pull run by the Midlands Tractor Pulling Club at the Shakespeare Country Raceway.

Read more about Vintage tractors...