Archive for the ‘CSS’ Category.

Mon 29
Aug
2011

How to Write Better CSS in 10 Easy Steps

Poisted by : WebGuru     Under : CSS, Website Design     1 Comment

A clean and proper CSS code can help create a website design faster and with more ease than when you are using tables. However, your first dig at CSS can be a little odd especially if you are comfortable using tables. Nevertheless, in the best interest of clean stylesheets and a more efficient output, here are 10 easy tips that will help you write better CSS:

1.    CSS Reset – is especially useful when you are writing the same code repeatedly to make your design displayable in different browsers. Using a CSS reset stylesheet would mean to build off browsers from zero and ensure your design is properly displayed in all browsers.

2.    Indent Always indent your CSS rules so that when you are writing more than 500 lines of CSS codes, you don’t need to sift through the file to find id’s and classes, and strain your eyes in the process.

3.    Comment These help keep your stylesheets structured. When you comment out blocks of codes, the scanning of classes and id’s become easier. Besides, when your clients go through your codes, they can change what they do not like without having to ask you.

4.    Keep it Clean Always code one rule in one line and multiple rules in multiple lines. That way, not only does your stylesheet look uncluttered, but also it’s easier for you to find items, and change them as required.

5.    Consistency This is not something you will notice as you work on a daily basis, but once you review your stylesheets, you will find a definite pattern you follow in the way you write specific lines of code. The idea is to maintain a single style of coding throughout your stylesheet, and those you will write in future, so editing becomes easier and takes less time.

6.    Separate the CSS hacks and conditional elements from your main stylesheet so their modification or editing can be done without affecting codes in your main style.css file.

7.    Shorthand Code Shorthand increases your speed of writing and also helps keep your stylesheet clean. Follow the clockwise format so each numeric value rightly corresponds to its quality.

8.    TOC A Table of Contents at the top of your stylesheet will allow you to easily find items in your code.

9.    Easy to Follow Names CSS id’s and classes should follow a proper naming structure so they are easy to understand.

10.    Alphabetical Order Following this in your CSS rules will make it remarkably easy for you to pick out specific lines to edit in your code. Haphazard alphabetization means you will have to scan you codes a while before you find a specific line and change it.

CSS is the most powerful and arguably the most vital component of modern website design. It adds flexibility to a website, improves content accessibility, reduces unwanted repetitions and complexities and thus helps the website to load faster. But in spite of so many advantages, writing CSS codes from the scratch is really a tiresome and time-consuming task that can freak out a CSS coder. Now, here we are going to share some useful CSS tools that can help you to save your time and effort to a great extent.

CSS Frame Generator

CSS Frame Generator: – Based on the provided HTML elements, CSS Frame Generator generates an empty CSS frame. You just have to copy and paste the XHTML content that will create CSS frame. You can add style to it later-on.

CSS Grid Builder

CSS Grid Builder: – A CSS-based web layout can easily be created with this powerful CSS tool – CSS Grid Builder. This tool uses YUI Grids CSS framework that offers support to almost 1000 different types of layouts.

CSS Typeset

CSS Typeset: – With this impressive tool, you will be able to test different font-style. Just select the font type that you would like to feature on your website and then copy and paste that code into your style sheet quickly.

CSS Optimizer

CSS Optimizer: – If you are obsessed with the loading time of your website, you should not miss out this powerful CSS tool. With it, you can successfully reduce file size by eliminating white space characters out of the CSS file.

CSS Redundancy Checker: – This CSS tool is good at finding out redundant CSS styles, which you should remove for making your website load faster. Size of the CSS file can be reduced significantly if you can manage to eliminate redundant CSS styles.

TypeTester

TypeTester: – Though features of this tool are more or less similar to that of the CSS Typeset, it gives you an opportunity to compare and contrast three different font-styles simultaneously.

YAML Builder

YAML Builder: – This is another popular and powerful layout generation tool that works on YAML framework to create grid layouts.

spiffycorners

Spiffy Corners: – This is a nice little CSS tool that lets you create rounded corner box without any images. Just a few clicks and you will be able to add nice looking rounded corner box to your web page.

W3C CSS Validator

W3C CSS Validator: – If you want to stick to the standards of web development, you should not ignore this important CSS tool. It is good at locating errors within your style sheet.

Your website looks good and impressive. So, why do you need to reformat or optimize your CSS? This is a valid question and thankfully, it has a valid answer. An optimized CSS file will help your website to get loaded quickly and thus increases the possibility of getting better visibility in different search engines. From developers’ point of view, optimizing CSS can prove extremely helpful since it will help them to pinpoint errors easily without wading through the muddles of complex and somewhat irrelevant codes.

However, if you were not so proficient in CSS, you would not have to press the panic button yet, since there are some free CSS tools available that can help you to optimize CSS codes without having any authority on it. Let’s check out some of these unique CSS optimization tools that can help you to make it large in the website design and development field: -

Clean CSS (cleancss.com/?lang=en): – This is a powerful CSS optimizer tool that comes loaded with a number of options that can help you make your website’s CSS codes more compact, clean and concise. Its options are a breeze to use and you would not have to waste painfully long time to get the hang of them.

CSS Compressor (csscompressor.com/): – This tool helps you to reduce the size of your CSS file by eliminating unwanted and irrelevant codes and thereby helping you to make your website load faster. CSS Compressor comes with four different levels of compression.

Code Beautifier (codebeautifier.com/)– Based on the already popular CSS parser – CSS Tidy, this tool can come in handy to clean up CSS codes of your website. Options of Code Beautifier are more or less similar to that of other CSS optimizer tools and that means, you would not have to struggle with its features. Some of its benchmark features are lower and uppercase formatting, font-weights, merge selectors, compress colors and many more.

CSS SuperScrub (isnoop.net/tools/css.php): – Truncate the complexities of your CSS codes by using the advance features of this revolutionary CSS optimization tool named – CSS SuperScrub. It is good at trimming down the size of the CSS file by eliminating redundant calls, by weeding out unneeded content and by grouping remaining element names precisely.

CSS Redundancy Checker (services.immike.net/css-checker/): – This is a simple tool but it is extremely effective since it helps you to locate redundant CSS codes that are not used by your HTML files.

Styleneat (styleneat.com/index.php): – This tool can help you to standardize and organize different CSS codes such as properties, sub-selectors and selectors. With this tool, you will be able to sort the properties alphabetically.

Coding is one such area of specialization where even big daddies commit silly mistakes and it is the website that gets punishment for that. Careless coding not only makes a website unresponsive at times, but it can also make a website virtually invisible in the online industry. Therefore, if you are running a website, you need to check and recheck all the codes to increase the visibility of your website and to make it more search engine friendly. Here we are going to share some common HTML and CSS coding errors that can have detrimental effects on your website’s overall online presence even:

HTML, CSS

Capitalization of Tags
Though it has little do with the validity of the HTML coding, this is definitely a bad practices (at least an eyesore) as it gives rise to unwarranted confusions. Try to write everything in lower case. It makes the codes look nice.

Wrong Closing Nesting Tags

Wrong Closing and Nesting of Tags
For the beginners, this thing is quite a common. But this is not so less common in experts. If you forget to close some tags, the entire HTML structure would go haywire and this can have serious impacts on the usability and accessibility of your website.You need to give serious attention to it if you are into a website design project.

Incorrect DOCTYPE!
Mention the DOCTYPE specifically to let the browser know what type of HTML you are using in the website. This can help the browser to display your website properly. Do not let the browser guess about your HTML code, be straight and mentioned DOCTYPE in clear English.

Special Character

No Special Character Please
Try to minimize the usage of special characters as some search engines cannot read them properly and therefore, there will be greater chance of being overlooked by them.

Inline CSS
Do not overboard your HTML file by featuring all the CSS codes in it. Create a separate CSS file and then fetch all the commands in the HTML document.

Do Not Use Automated Coding Software
Say no to Automated Coding Software. They may seem good at first but sooner or later you will be able to realize that they are making your website a complete garbage by dumping unwanted elements in the HTML file. Moreover, you might find it overwhelmingly difficult to make changes in it.

Do not Mingle Single Quotes and Quotes
Try to stick to either single quote or double quote, but you should not use both of them as you will eventually mix them up badly and cause great damage to the health of your website.

Wed 18
Aug
2010

CSS is a remarkable language that gives website designers unlimited scope to modify a large number of pages instantly without opening and editing them manually. However, despite having a series of mind-blowing features, it has some serious shortcomings that can drive a website designer literary crazy. Now, if you are finding it difficult to manage with these shortcomings, here are some CSS preprocessors that are powerful enough to parse the variables of CSS into regular style sheets. Here in this article, we have included a long list of some of the most efficient and powerful CSS preprocessors that you can give you enough opportunity to speed up the development time. So, just start exploring it:

Sass: – CSS is really a fun if we go by the philosophy of Sass. This particular CSS preprocessor allows the use of variables and offer a simplified syntax that can prove highly effective. A truly amazing experience is waiting for you and all you have to do is to explore it at its earliest. Though it is a great tool for both the website designers and developers, it is only available for Ruby.

CSS preprocessors - SassTurbine: – If you are hardcore PHP lover, here is something that you will certainly like to have. Turbine can help you reduce time of the project as it allows minimal usage of syntax, multiple CSS, cross-browser compatible, automatically gzip and many more. So, if you are into PHP here is something for you that you should keep in your exclusive collection.

Less CSS
: – It is probably the best and the most effective CSS preprocessor that offers a simplified syntax and variables can be used with it. It is ideal for Ruby but if you are muddling with a PHP project, you can still try out this one.

CSS preprocessors Less-CSS

CSS PP: -It is still in the development stage but the developers believe that it can get released soon. The most interesting aspect of CSS PP is that it is likely to be available for Ruby, Python and PHP. So, if you are making experiments with all these three powerful languages, this news is certainly going to cheer you up.

Switch CSS: – It is a highly powerful and feature rich CSS preprocessor that can prove highly effective while working with Apache and other similar applications.

DT CSS: – DtCSS is another popular CSS preprocessor that is widely employed for speeding up CSS coding by extending some of the common features of CSS such as color mixing, nested selector etc. DtCSS is good for reading CSS file and it gives standard CSS outputs. If this is not enough, here is something more. It is offering a smart caching system that can come in handy while continuing your tryst with a website design and development project.

CSS Cacheer: – It is another CSS preprocessor that can be utilized for creating plugins. To make it work, you need to have PHP and Apache with mod_rewrite and mod_deflate.

Tue 10
Aug
2010

As new trend is continuously gaining momentum, it has turned turtle the very concept of website design. With the emergence of HTML5 and CSS3, it is becoming evident that website designing industry is undergoing a rapid transactional stage. Therefore, as a designer, it is your moral responsibility as well as professional to enhance your design skills so that you can face the challenges of coming decades more efficiently than ever. Since CSS3 is comparatively a newfound area of work, you might find it highly complex to get the hang of it. Here we have included a list of #6 CSS3 tools so that you continue your tryst with CSS3 with a strong note: -

CSS3 Transforms: – It is probably the best and the most versatile CSS3 tool that will let you continue your experiment with it. It comes with a number of unique features that are powerful enough to create jaw-dropping effects that include skew, rotation, position etc. Besides that, it is good at generating corresponding code.

CSS3 Transforms

CSS3 Generator: – It comes with a number of CSS3 properties that include Box Shadow, Text Shadow, Box Sizing, Box Resizing, Outline, @Font Face etc. All you need to do is to make a choice from its long list. It also features a “Preview Area” where you can have a look of the changes that you have done. So, what you are waiting for. Just explore more about this amazing tool.

CSS3 Generator

CSS3 Button Maker: – Those of you who are having a tough time with CSS3 Button can find it as a fresh new breeze. Its simple interface will let you design a CSS3 button without wasting much time and hassle. You can change the gradient colors, bottom gradient color, top border color, text color, hover text color etc easily.

CSS3 Button Maker

CSS3 Gradient Generator: – It is another powerful CSS3 tool that deserves to be included in your collection of CSS3 tools. It is the best tool for website designer and developers to generate a gradient in CSS. The result of this tool is widely employed in different fields. You can use it a background image, border, mask etc.

CSS3 Please! : – If you want to do some experiments with CSS3 or want to make some minor tweaks here and there in the code, this is the ideal tool that you can have for this purpose. You can have a live preview of what you are doing right in screen. When you are satisfied with the outcome, you can apply the same structure onto a website by copying and pasting the entire code.

CSS3 Selectors Test: – It is a complication of a large number of small tests for determining whether your browser is compatible with CSS selectors or not. If any selector of CSS is not compatible with CSS3 Selectors test, it will be marked automatically.

CSS3 Selectors Test