Thursday, 15 April 2010

Chrome: Web Developer's Paradise

If you have chrome and you have never gone Page > Developer > Developer Tools, You've missed half the cake. So far, almost all of my problems have been fixed using this built in 'program'. Waaayyy more powerful than firebug. I use it all the time. And I suppose all I'm saying to you is "try it out if you haven't tried it before!".

Friday, 9 April 2010

A Pig of a sub-menu drop-down problem

I was asked to make a drop-down on a website the other week. And I have spent ages trying to do it. It is a pig. Ok, the first thing I did is I went to (only for the drop-downs), and I had a look at how they did their drop-downs. Their drop-downs 'scroll' out and are compatible in all browsers.

So, naturally, I had a look to see if I could get their code. There is loads of scripts controlling it. Fat, big amounts of flashy code. Hated it! I gave up because of the size and the fact that I could barely get my head round it!

So, I went on to something else,something simpler. I downloaded some code of of a website and it said 'COPYRIGHT! do not remove this comment!', so I stopped using that code!

Next I decided to make my own code using Document.getElementdBybyId. And I found a simple hide element function in javasript. I perfected it with css, another function and VOILA! I had it working! The drop-down popped out when you hovered over it with OnmouseOver and went away with OnMouseOut. very Nice!

Then the problem's started to become clear! When you scrolled down and hovered over the link, it showed the drop-down in the wrong place, you couldn't reach it without it disappearing! And it didn't work in Internet Explorer! Ok, back to square 1!

So, I then(gave up!) googled 'html submenus'(or something like that!) and I eventually(eventually) found this place, and I found a multi-browser compatible piece of code. So, I messed around with that. This time, I was a little more successful.

So, this one gave me a way to have multiple sub-menu's by throwing the emement 999px to the left instead of hiding it. A little more unprofessional, but it worked! And it was also more compatible than the previous one. My first little problem with it was that it was made for lists, and my menu was in a table. So I had to put a list inside a table to fix that. Then I had to position it, that was eally a pig! But in the end it worked and this is the css I used(No javascript!):

/*Submenu styles:*/
#nav, #nav ul {padding:0;margin:0;list-style:none;text-align:left;}
#nav li ul {height:100px;width:80px;padding:3px;position:absolute;background:url(theme/rim.gif) no-repeat bottom;left:-999px;z-index:+1;}
#nav li:hover ul {left:50%;margin-left:86px;top:198px;}

I hope this help's all the geeks who read my posts(And thanks for reading them too) !

Wednesday, 7 April 2010

I am now a web developer!

Hello World! I am now developing two websites for two different people. I am now very happy! So, just to say, you may get a few developer's tricks from this blog in the future!

Monday, 5 April 2010

Crunchbang Linux Review

I did not expect much when it came to Cunchbang, but of course, I was proven wrong. I like the 'openbox' DE, the use of keyboard short-cuts integrated into the user environment, and I express my inner geek by saying 'it's cool'!

So, I tried out crunchbang 9.04 and 10.4 beta 1 today and I found them both brilliant operating systems(allthough I have not yet completely got my head round them!)