CSS: Quick tips for have an easier daily experience with Cascade Sheet Style (Part 1)


As with most things, a logical and structured approach is the b

Everybody knows CSSS is moving forward in order to improve your developing lifestyle and boost your web applications. With CSS you are able to save time and energy when you are coding your web pages. Also CSS is more secure than ever and let you make a more efficient work everyday. When you are structuring your webpage CSS is evidently the correct choice for you in order you can design your site from scratch without headaches and complications. In this series of articles I would like to share with you some important tips that will help you in: 1) Simplify your developing experience each day and, 2) Obtain a better performance while you apply all the good techniques from CSS.

1. Try to code your site as simple as you can: When you are coding your website you should try to make your code as simple as you can in order you avoid future misunderstanding that lead you to confusions or waste of time. Try to keep your site simple. Try to plan your layout logically and express your ideas clearly. Whether you are part of a developer team it will be a backbone because each team member should understand the part of the process done by you. Your site should be accessible and easy to handle. Sometimes you try to make a lot of things that users can’t understand or take a lot of time to find. Your website should be easy to explore and very user friendly. The main advantage you get when you have a simple CSS coding in your website is that in future maintenance or modifications you will be able to work quickly. Moreover, try to comment well your CSS code for further uses.

2. Improve the logic of your sections using “divs”: You can use CSS “divs” for obtain better sections in your web pages. Many experts recommends there’s no a better alternative than use CSS divs to divide a web page in separated logical sections. The advantage is that each section can have its own id and you will be able to pinpoint specific elements on each section. That’s why it is the best option for separate each page of your website. Now, let me show how you can perform an example of a good and bad idea.

Bad CSS idea: This example shows a common misuse of divs. For instance, it is a HTML code that shows you the bad use of divs. This code really works but it is not a recommend use.

<ol>
	<li><div 	id="header"></li>
	<li><div 	class="bold">it 	is a webslave heading</div></li>
	<li></div></li>
	<li><div 	id="subheader"></li>
	<li><div 	class="bold">it 	is a webslave subheading</div></li>
	<li></div></li>
	<li><div>this 	is a webslave content</div></li>
</ol>

Good CSS idea: In the following example you will have the recommended code in order you can simplify your CSS code for divs. This example in most cases can reduce your time coding and give you a good result.

  1. <h1>Webslave heading</h1>
  2. <h2>weblsave sub heading</h2>
  3. <p>webslave content</p>
You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.