Blog posts

Using CSS Float Property

The CSS float property is used to determine the position of HTML elements. Elements with the float property applied to them align themselves (or “float”) to the left or right sides of their container while retaining their position within the page’s flow. Float takes four values: left, right, none (this is the default), and inherit, which means that the element should inherit the float value of its parent element. Floats are commonly used to wrap text around images. Here’s how it works:

Let’s say you have an image in your HTML that is followed by text, like this:


And let’s say you want the text to appear to the right of the image rather than underneath it.… Continue Reading

CSS Blogs to improve your programming skills

The best way to keep your programming skills sharp is to refer online sites or blogs. Many programming experts and programming companies maintain blogs where they share their handy programming tricks. Developers can choose any of these useful blogs and keep brushing up their skills.

The toughest job is to select the best blog among the available ones. It is really important to choose the right one, since no one has time to waste referring to old and unnecessary information. Here are a few CSS blogs that will help in keeping any developers programming knowledge updated and their skills sharp.


Continue Reading

Create Textured Text Using CSS3

Because sometimes Photoshop isn’t the best option…here’s how you can add some texture to headers and other text using only CSS’s background and background-clip properties.


For this tutorial I used this colorful doodle image as the background or the “texture” for my text.


My HTML was pretty standard — I just created a header tag within a div with a class of texture:

  1. <div class="texture">;
  2. <h1>CSS3 FILES</h1>
  3. </div>

In the CSS, all you need to do is make your choice of texture image the background of .texture h1, then give the h1 a background of font a color: #fff, and then use -webkit-text-fill-color: transparent to override the white text color.… Continue Reading

Using CSS3 to Change the Default Text Selection Color

Thanks to the CSS pseudo-selector ::selection, overriding the default text selection color is an easy way to customize your web pages. All you need to do is define the background and color to be the exact shades you want, like this:

  1. ::selection{
  2.     background: #4207C9;
  3.     color: #fff;
  4. }

Using ::selection on its own selects the entire body of a web page, but you can also use it to select only certain types of elements, or elements with a particular class or ID.

  1. p::selection{
  2.     background: #4207C9;
  3.     color: #fff;
  4. }
  6. a.purple::selection{
  7.     background: #4207C9;
  8.     color: #fff;
  9. }

The above example would change the text selection color to purple on all p elements, and on all a elements that have a class of purple.… Continue Reading

15 Common CSS Interviews Questions and Answers

CSS stands for Cascading Style Sheets. This style sheet language is used for describing and formatting the look of a document and is written in a markup language. Generally, these are written using HTML and XHTML. So, it becomes important for you to have basic knowledge about them.

What actually CSS is? CSS styles were first added to HTML 4.0 to solve some problem and now is used to display HTML elements. External style sheets are present in CSS, which can save a considerable amount of work.

Here in this article we have mentioned 15 CSS interview questions along with answers that are commonly asked.… Continue Reading