MUSINGS

How to centre a block element on the page using CSS

How to centre a block element on the page using CSS

In the past I’ve always used the following CSS code to centre a DIV (or other block element) on a page.

#divid {
  width: 620px;
  left: 50%;
  margin-left: -310px;
}

It works by setting the left edge of the div at 50%, which if it containing element is BODY then we are setting the left edge to 50% of the page. If we left it at that then the DIV would start at half way and not be centred at all. The trick is to set the left margin “margin-left” to be negative half of the DIV’s width. This forces the DIV back towards the left by half and therefore you end up with a DIV centred on the page.
Another method is to use the following. Read more about How to centre a block element on the page using CSS

How to turn on auto adjust for daylight savings using a VBscript

How to turn on auto adjust for daylight savings using a VBscript

Daylight savings changes can often pose a problem for IT support professionals. Usually these issues arise when governments decide to change daylight savings rules or your organisation operates in multiple time zones. A common problem often encountered is the computers clock doesn’t adjust for daylight savings time. This can occur because either the wrong time zone is selected or the “Automatically adjust clock for Daylight Saving Time” is deselected in the time zone settings. For example the Queensland time zone may be selected for a Hobart computer which means the time will be correct until daylight savings kicks in and then the time won’t adjust.
In the first example the solution is to change the computer to the correct time zone. In the second example the solution is to simply select the “Automatically adjust clock for Daylight Saving Time” option, but what if you need to apply the setting to multiple Windows computers? The answer is to use a script via group policy or other method.
The following simple script will re-enable daylight savings. Read more about How to turn on auto adjust for daylight savings using a VBscript

How to create a Cisco ACL to protect your business from being SPAM blacklisted

How to create a Cisco ACL to protect your business from being SPAM blacklisted

As the mantra says: prevention is better than cure. This is particularly so when it comes to being blacklisted for SPAM. Cleaning up after being listed can take days, and in the mean time you’ll find your client’s email being rejected by various mail servers and basically becoming very unreliable. Read more about How to create a Cisco ACL to protect your business from being SPAM blacklisted