Oh so tired

Waking up at dawn is a great thing. It really is. The sun is coming up, the birds are waking, the dawn chorus breaks. It’s an experience to behold.

It isn’t, however, overly pleasant when you haven’t had a decent nights sleep in a few days.

Sweetcorn, Squash and Tomatoes

More gardening done, and hopefully more vegetables to grow.

4662 90988517950 512407950 1956634 6638071 n Sweetcorn, Squash and Tomatoes

Sweetcorn and Squash

4662 90988527950 512407950 1956635 4318200 n Sweetcorn, Squash and Tomatoes

Tomatoes

4662 90988537950 512407950 1956636 5197991 n Sweetcorn, Squash and Tomatoes

The new patch

My concern for this particular patch of vegetables is that they won’t get enough sun. I’m cutting back a tree to remove the biggest amount of shade, but I may have planted these in the wrong place. I guess time will tell.

Meditation

The world is a mirror of Infinite Beauty, yet no man sees it. It is a Temple of Majesty, yet no man regards it. It is a region of Light and Peace, did not men disquiet it. It is the Paradise of God. It is more to man since he is fallen than it was before. It is the place of Angels and the Gate of Heaven.

-Thomas Traherne

Using different CSS styles in Javascript enabled browsers

This is an easy to implement, yet useful and possibly powerful technique. Using different CSS rules in JavaScript enabled browsers lets you customise your website styles for JS enabled and disabled browsers using only CSS.

Thus: you leave the concerns of styling strictly to CSS, and the business aspect of the website to the javascript.

All you need to do is to add some class or id to body element using JavaScript to specify that JavaScript is available. Then define two rules in your CSS file(s) for JS enabled and disabled browsers.

Here is an example for a JavaScript enabled browser:

document.getElementsByTagName("body")[0].setAttribute("class", "js");

And in your CSS file:

.aClass{
    display:block;
}
.js .aClass{
    display:none;
}

Why do I need to have a different CSS styles for jQuery enabled browser you might ask. Well, consider you have a drop-down menu on your website’s sidebar and you would like to use Javascript to make it drop down on mouse hover. This would render the element not accessible if the user has disabled Javascript on his/her browsers.