Posts

Showing posts from November, 2021

Increase border width on hover without moving other content

Image
In this post, I describe how to increase the border thickness when you hover over an element without causing other elements on the page to move around. Cause If you add or increase the border width (top or bottom) of an element, it will increase the height of that element, which can cause other things on the page to move down. Resolution Element does not have a border If your element doesn't already have a border, you can add a transparent border, then change this to a coloured border on hover, for example: .item { border : 1px solid transparent ; }     .item:hover { border-color : red ; } Element has a border There are three ways to add a thicker border on hover if the element already has a border: 1. Reserve space in the element and expand the thicker border into that space.  For example, if you have an a element sized using line-height, you can set the min-height to a slightly bigger value to cater for the thicker border on hover: .item {     line-height : 2rem ;     min-he

Filter Windows Event Log by Exception Message

Image
In this post, I describe how you can filter the Windows Event Log by Exception Message.  This allows you to see when and how often a particular exception has occurred. The Get-EventLog PowerShell cmdlet can be used to get all the event log entries with an exception message containing the specified text, for example, the following command gets all the entries containing the text "The process cannot access the file": Get-EventLog -LogName Application | Select Index , TimeGenerated , Message , Source | where {( $_ . Message -like "*The process cannot access the file*" ) -and ( $_ . Source -like "ASP*" )}

The hostname in the website’s security certificate differs from the website you are trying to visit.

Image
In this post, I describe how to fix the error The hostname in the website’s security certificate differs from the website you are trying to visit. Error Code: DLG_FLAGS_SEC_CERT_CN_INVALID This error can occur when you browse to an HTTPS address: Cause This can occur when you have configured an IIS Site Binding to use HTTPS but there is a problem with the certificate you have selected. Resolution To resolve the issue, follow the steps in my other post  Mismatched Address certificate error - HTTPS localhost IIS Related Posts - Mismatched Address certificate error - HTTPS localhost IIS - How to create a self-signed public certificate - Powershell

Mismatched Address certificate error - HTTPS localhost IIS

Image
In this post, I describe how to use HTTPS with SSL on a local IIS development environment without the Mismatched Address certificate error: Cause This error can occur when you use Create Self-Signed Certificate in IIS.  The error says "Mismatched Address" and that the server cannot prove that it is its name. Resolution To resolve the issue, you can use the PowerShell cmdlet  New-SelfSignedCertificate to create the certificates. The following PowerShell code will create the root certificate, then create the SSL certificate signed by the root certificate, then import the root certificate into the Trusted Root Certification Authorities store: # Create the root certificate and store the thumbprint in a variable $thumb = ( New-SelfSignedCertificate -Type "Custom" -KeyExportPolicy "Exportable" -Subject "ROOT" -CertStoreLocation "Cert:\LocalMachine\My" -KeySpec "Signature" -KeyUsage "CertSign" -NotAfter ( Get-Date ) . A

Chrome address autocomplete covers QuickBooks Country autocomplete

Image
In this post, I describe a quick way to hide the Chrome address autocomplete which can appear and cover over the QuickBooks Country autocomplete, preventing you from selecting the country: If you click out of the textbox, both the Chrome autocomplete and the QuickBooks autocomplete disappear. Resolution If you press Escape whilst both autocompletes are showing, only the Chrome autocomplete disappears, revealing the QuickBooks autocomplete underneath:

Windows 11 God Mode - shortcut to all control panel settings

Image
In this post, I describe how to create a shortcut to all the control panel settings in Windows 11.  This trick also applies to Windows 10, 8 or 7 and has the rather elaborate name "GodMode". To create the shortcut, simply create a Folder in Windows Explorer and give it the name: GodMode.{ED7BA470-8E54-465E-825C-99712043E01C} The shortcut will automatically show a control panel icon: Open the shortcut to view all the control panel settings. You can right click a group heading and select Collapse all groups if required.