My Blog

My WordPress Blog

My Blog

My WordPress Blog

CSS Validation

Why Validate Your CSS Code As a beginner, it is very common that you will make mistake in writing your CSS code. Incorrect or non-standard code may cause unexpected results in how your page displayed or functions in a web browser. The World Wide Web Consortium (W3C) has created a great tool https://jigsaw.w3.org/css-validator/ to automatically check your […]

CSS Opacity

Cross Browser Opacity Opacity is now a part of the CSS3 specifications, but it was present for a long time. However, older browsers have different ways of controlling the opacity or transparency. CSS Opacity in Firefox, Safari, Chrome, Opera and IE9 Here is the most up to date syntax for CSS opacity in all current […]

CSS Sprites

What is a Sprite Sprites are two-dimensional images which are made up of combining small images into one larger image at defined X and Y coordinates. To display a single image from the combined image, you could use the CSS background-position property, defining the exact position of the image to be displayed. Advantage of Using CSS Image […]

CSS Alignment

Text Alignment Text inside the block-level elements can aligned by setting the text-align properly. Example See tutorial on CSS Text to learn more about text formatting. Center Alignment Using the margin Property Center alignment of a block-level element is one of the most important implications of the CSS margin property. For example, the <div> container can be aligned horizontally center by setting the left and right margins […]

CSS Float

Floating Elements with CSS You can float elements to the left or right, but only applies to the elements that generate boxes that are not absolutely positioned. Any element that follows the floated element will flow around the floated element on the other side. The float property may have one of the three values: Value Description left The […]

CSS Layers

Stacking Elements in Layers Using z-index Property Usually HTML pages are considered two-dimensional, because text, images and other elements are arranged on the page without overlapping. However, in addition to their horizontal and vertical positions, boxes can be stacked along the z-axis as well i.e. one on top of the other by using the CSS z-index property. […]

CSS Visibility

Controlling the Visibility of Elements You can use the visibility property to control whether an element is visible or not. This property can take one of the following values listed in the table below: Value Description visible Default value. The box and its contents are visible. hidden The box and its content are invisible, but still affect […]

Scroll to top