Changing image on hover with CSS/HTML

Another option is to use JS: <img src=”https://stackoverflow.com/questions/18813299/LibraryTransparent.png” onmouseover=”this.src=”LibraryHoverTrans.png”;” onmouseout=”this.src=”https://stackoverflow.com/questions/18813299/LibraryTransparent.png”;” />

Inline elements shifting when made bold on hover

Pre-set the width by using an invisible pseudo-element which has the same content and styling as the parent hover style. Use a data attribute, like title, as the source for content. li { display: inline-block; font-size: 0; } li a { display:inline-block; text-align:center; font: normal 16px Arial; text-transform: uppercase; } a:hover { font-weight:bold; } /* … Read more

How to affect other elements when one element is hovered

If the cube is directly inside the container: #container:hover > #cube { background-color: yellow; } If cube is next to (after containers closing tag) the container: #container:hover + #cube { background-color: yellow; } If the cube is somewhere inside the container: #container:hover #cube { background-color: yellow; } If the cube is a sibling of the … Read more