RSS feed for this section

Archive | CSS

How to Focus element using pure HTML ? How to set CSS for on Focus?

To set focus on page load using pure html you can use the autofocus keyword. Here is an example on JsFiddle. And to set the css for on focus use the :focus selector in your css. Below is the sample code I have used. <form> <input type=”text” id=”FirstName” placeholder=”First Name” autofocus> <input type=”text” id=”LastName” placeholder=”Last […]

How to create a Google Chrome App?

Step 1: Create the manifest Every extension, installable web app, and theme has a JSON-formatted manifest file, named manifest.json, that provides important information. First create your manifest.json file using the format shown here. { “name”: “Code Formatter”, “description”: “A chrome plugin to format your HTML, CSS, JS, SQL or JSON code.”, “version”: “0.1″, “app”: { […]

How to override all styles in CSS

I recently came across a very unique requirement, I wanted to change all font-family(s) I had used for this site. I had defined font-family at many different places in divs, spans, h1s, h2s and where not, so I wanted some shortcut way to do this. Here is what I had used, {code type=CSS} * { font-family:”Calibri” !important […]

Remove a div / text using CSS

To remove a div or some text, I had used the display:none ;property. Another option is using the visibility: hidden; visibility: hidden will hide the element, but it will still take up space in the layout. display: none removes the element completely from the document and will not take up any space, even though the HTML for it […]