Friday, 27 June 2008
Bill Gates to Step Down
More @ BBC News
Icann Approves Domain Name Overhaul
More @ BBC News
Thursday, 26 June 2008
Icann to Vote on Opening up TLDs
More @ BBC News
Wednesday, 25 June 2008
FireFox 3 Default Mac Theme for Windows
Want the FireFox 3.0 theme that's installed as default on Macs for your Windows version of FireFox? An "experimental" theme (meaning you'll need to log in to the Mozilla site to download it) has been created and is available here. Personally I much prefer it to the default Windows one and have been using it for a little while now - definitely recommended! Oh, and if you haven't already got FireFox 3.0, GO GET IT!
Browser Usage: Graphical Illustration
MS to Stop Selling Windows XP
Tuesday, 24 June 2008
Pure XHTML / CSS Drop Down Menus
- In this instance I'm going to build a little menu bar which sits at the top of a DIV containing some text. Here's the HTML :-
<div id="Content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam
facilisis accumsan est.
</div> - Next we need to wrap the content DIV in a container DIV which we're going to use to house the drop-down menus :-
<div id="Container">
<div id="Content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam
facilisis accumsan est.
</div>
</div> - The content DIV needs to be absolutely positioned within the container DIV so that it doesn't move around when the menus drop down, and the container DIV needs to be relatively positioned to allow us to move the whole lot around, so we need to give them some CSS :-
<style>
#Content {
position: absolute;
top: 30px;
z-index: -1;
clear: both;
}
#Container {
position: relative;
}
</style>
You'll notice that I've given the content DIV a z-index of -1. This sends it to the back of the other elements, which allows the menus to drop down over the top of it. I've also set the clear property of the content DIV to both for reasons which will become clear shortly. - Next we need some menus. The menus are just a DIV with a series of links in. You could well (and probably should) implement the links in an unordered list, but for the purposes of this experiment unadulterated links will do just fine :-
<div id="Container">
<div class="Menu">
<a href="#">Menu 1 Link 1</a>
<a href="#">Menu 1 Link 2</a>
<a href="#">Menu 1 Link 3</a>
<a href="#">Menu 1 Link 4</a>
<a href="#">Menu 1 Link 5</a>
</div>
<div class="Menu">
<a href="#">Menu 1 Link 1</a>
<a href="#">Menu 1 Link 2</a>
<a href="#">Menu 1 Link 3</a>
<a href="#">Menu 1 Link 4</a>
<a href="#">Menu 1 Link 5</a>
</div>
<div id="Content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam
facilisis accumsan est.
</div>
</div> - Next we want to give the anchor elements (i.e. the menu item links) some style. This is just visual style to make them look like a menu. I've chosen white text on a black background with a blue-green background when hovered. I've also given them a height of 20px with a top border of 1px, making the overall height of the anchor element 21px, and have set their display style to block to cause them to act like a block element and not an inline element. :-
.Menu A:link, .Menu A:visited {
font-family: Tahoma, Verdana, Arial;
font-size: 10px;
display: block;
background-color: #000000;
color: #FFFFFF;
height: 20px;
text-decoration: none;
text-align: center;
line-height: 20px;
border-top: 1px solid #333333;
}
.Menu A:hover {
font-family: Tahoma, Verdana, Arial;
font-size: 10px;
display: block;
background-color: #0087A1;
color: #FFFFFF;
height: 20px;
text-align: center;
line-height: 20px;
border-top: 1px solid #333333;
}
Specifying .Menu in front of the anchor selectors restricts the style to just links which are members of a menu DIV - handy if you don't want all of your links to look like menu items! - With that done we need to style the menu DIV itself. Collapsed it's going to need a height of a single menu item (21px as described above) and expanded it's going to need to be the height of 5 menu items (5 * 21px = 105px). We're going to trigger the drop down when the mouse hovers over the first menu item by using the hover selector on the menu DIV (yes, you can use the hover selector on things other than anchor elements!). We're also going to give it a z-index of 10 which puts it on top of the content DIV, and we're going to float it left so that the menus will line up on the same line (hence the clear: both property on the content DIV earlier) :-
.Menu {
width: 80px;
height: 21px;
overflow: hidden;
float: left;
z-index: 10;
}
.Menu:hover {
height: 105px;
} - At this stage you should have a fully working set of drop-down menus in FireFox. In Internet Explorer however, you will notice a slight gap at the bottom of each menu item when you drop it down, and when your mouse passes over a gap that has content showing through from underneath the menu rolls back up. Not much use. Thankfully fixing it is simple - what's happening is that IE is parsing and rendering the whitespace between anchor elements, so to fix it all we have to do is remove that whitespace, placing all the links within each menu on a single line. It doesn't do anything for the readability of our code, but at least it's simple to fix and doesn't leave us with anything that's dubious when it comes to standards compliance :-
<div id="Container">
<div class="Menu">
<a href="#">Menu 1 Link 1</a><a href="#">Menu 1
Link 2</a><a href="#">Menu 1 Link 3</a><a
href="#">Menu 1 Link 4</a><a href="#">Menu 1
Link 5</a>
</div>
<div class="Menu">
<a href="#">Menu 2 Link 1</a><a href="#">Menu 2
Link 2</a><a href="#">Menu 2 Link 3</a><a
href="#">Menu 2 Link 4</a><a href="#">Menu 2
Link 5</a>
</div>
<div id="Content">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam
facilisis accumsan est.
</div>
</div>
So there you have it, drop-down menus using nothing but a little simple CSS.
Knight Rider Sat Nav

Always wanted your own KITT to go with your dodgy leather jacket, perm and cheesy grin? Well now, thanks to sat nav manufacturer Mio, you need dream no longer! Well, sort of. Mio have released a Knight Rider inspired sat nav unit which features not only the words "Knight Rider" emblazoned across the top of the unit, but also KITT-esque LED lights on either side of it, and a piƩce de resistance - KITT's voice to give you the directions!
More @ The Register.
Monday, 23 June 2008
New Site Focus
If you have any suggestions for articles to be published here, have found an interesting link you think my readers will be interested in, or want to contact me for any reason, feel free to email me on diadoramirez@gmail.com.
Monday, 15 October 2007
Excel's logical comparison operators
Today I had cause to try and compare the outcome of two logical operations in Microsoft Excel as part of an IF() function. Basically what I wanted to do was to output a 1 or 0 dependant on whether the current date was part of a given week. So I had a sheet which looked something like this:
| A | B | C | D | E | F |
| 5 | Week Commencing: | 08-Oct-07 | 15-Oct-07 | 22-Oct-07 | 29-Oct-07 |
| 6 | Current? | 0 | 1 | 0 | 0 |
Now, to me this seemed very simple. All I had to do was a very simple IF() function which, to my mind, should look like this:
=IF((NOW() => C$5) and (NOW() < C$5 + 7), 1, 0)
The IF() function evaluates the first expression ((NOW() => C$5) and (NOW() < C$5 + 7) in this case) and outputs either the second parameter (1 in this case) if the expression is true, or the third parameter (0 in this case) if the expression is false. So the English equivalent of my function is this: If today’s date is the same or equal to the date contained in cell C5 (or D5, E5 etc) AND is less than that date plus a week, then out put a 1, otherwise output a 0.
With 10 years or so (mostly Microsoft-based) programming experience behind me, this simple logic made sense and should, as far as I could tell, work. It didn’t. What’s more, Excel in all it’s wisdom, decided to only tell me that the formula was invalid, but not actually why it was invalid. Thanks Excel!
So, I did what I do with programming issues that I come across – I Googled it, and Google delivered, after a fashion at least. I found an article about nested IF() functions which happened to include a reference to a function called AND(). It does exactly what it says on the tin as well, it performs an and on a series of expressions and returns the result – true if they’re all true, and false if they’re not all true. So, my final formula ended up as this:
=IF(AND(NOW() => C$5, NOW() < C$5 + 7), 1, 0)
Hey presto, how to perform the most basic of logical operations in Excel!
