Categories
Css Css3

Bring new life into your CSS

Creativity does not belongs by born. So using CSS pretty much anything that can be done using your feelings. Make your interest in depth and you will be easily drawn to the next big thing. The same rule follows web industry. Days by day the world of CSS is exploring that you considered previously. Here […]

Categories
Css Css3

em vs px

The most confusing part of CSS styling is that font-size attribute i.e. how this will show in various resolutions. em: This scalable unit is used in web document media due to scalability and their mobile-device-friendly environment. For instance one em is equal to current font-size i.e. if font-size of the document is 10pt then 1em […]

Categories
Css Css3

Knowing !important

Using !important rules can be a dangerous way to style your webpage that usually means you are forcefully doing this, but they exist for some reason. The paragraph will be colored red, even there is a ID selector that has higher priority. So, the this rule overrides all the particular property. An !important rule works […]

Categories
Css Css3

Difference between @import and link

Using both @import and link tag you can include style sheet in a webpage. But there is a difference. For performance “link” has a much better advantage. Example of @import and link: <link href=”style.css” type=”text/css” /> <style type=”text/css”> @import url(“style.css”); </style> As @import allows you to import one style sheet into another but older browsers […]

Categories
Css3

Rounded Corners in CSS

This below content gives you an idea how to make cross-browser compatible rounded corners with CSS. Example of Rounded Corners: <!DOCTYPE html> <html> <head> <style> .roundCorner{ background: #C2C2C2; border-radius: 25px; border: 3px solid #C2C2C2; padding: 15px; width: 150px; height: 150px; } </style> </head> <body> <div class=”roundCorner”>Rounded corner div!</div> </body> </html>

Categories
Css Css3

Use reset.css

Reset.CSS is used to normalize browser’s default styles that resets the styling of all HTML elements to a consistent baseline. Every browser has its own default ‘user agent’ stylesheet which use unstyled websites appear more legible. For example default links color is blue and visited links are purple color. – Some reset stylesheets is harmful […]

Categories
Css3

A Little Known CSS Facts

As you have been writing css for several years day by day you are getting new things that you have never used previously. Each and every well trained front-end developer feature-tests before using any features which a browser may not have. This feature testing has always done with scripting, and most of the people use […]

Categories
Css3 Html5

CSS3 required styles

Using HTML5 required style you can validate your form and show error. But sometimes you need to give a style like keep the color red for error or green on success.  Here’s how to use CSS3 required. Here is a sample example for required css: <!DOCTYPE html> <html> <head> <title>CSS3 styles</title> <style type=”text/css”> input[type=”checkbox”]:required:invalid + […]

Categories
Css3

Using calc() calculate values in css

calc() function is a good feature of CSS. For arithmetic calculations in CSS it is used. You can use it for percentages and pixels also. In IE9 towards it works also. This is a native CSS way for doing simple math in CSS which is a replacement for any length value. It has four simple […]

Categories
Css3

Webfonts Explained

Unlike web safe fonts a webfont is a special font used on websites using the CSS @font-face declaration. A webfont has four flavors. A TrueType, WOFF, EOT and an SVG file. To target in different browsers each one is designed. You will require all four files when using webfonts for a website. You can get […]