Posts Tagged ‘div’

Create smaller CSS files

Friday, October 5th, 2007

This article will tell you how to make your CSS files a bit smaller. You can ask yourself one question; Why shouldn’t you? Read on to find out how to do this.

There are only advantages of making your CSS files some smaller. When your website uses a 5k CSS file, you might not see the difference in loading time, but when using bigger (25k) files, you can notice your website will load a bit faster when using some of the steps below. Another thing is that your file will become more organized and clean. Read on to get tips of improvement.

The main idea of this article is to reduce the number of characters you have used in your CSS. The less characters, the smaller your file.

Comments 

You have different ways of using comments. Comments may be something you can not delete in your CSS, because you might forget something (or your fellow-workers). But, there are a couple ways of using them.

/*———————-*/
/*—–Comment—–*/
/*———————-*/

These lines of code do the same as:

/*Comment*/

You can still read what it says and what tips it gives. The only thing you did is to save space.

Color prefixes

(more…)

Web Design Elements You Should Avoid Having on Your Site

Thursday, October 4th, 2007

As a web designer, you should design your websites to give your visitors the greatest ease of use, the best impression and most important of all a welcoming experience. It doesn’t matter if you had the greatest product in the whole world — if your website is poorly done you won’t be able to sell even one copy of it because visitors will be driven off your website by the lousy design.

When I’m talking about a “good design”, I’m not only talking about a good graphical design. A professional web design will be able to point out that there are many components which contribute to a good website design — accessibility design, interface or layout design, user experience design and of course the most straightforward, which is graphic design.

Hence, I have highlighted some features of the worst web designs I’ve come across. Hopefully, you will be able to compare that against your own site as a checklist and if anything on your site fits the criteria, you should know it’s high time to take serious action!

1) Background music

Unless you are running a site which promotes a band, a CD or anything related to music, I would really advise you to stay away from putting looping background music onto your site. It might sound pleasant to you at first, but imagine if you ran a big site with hundreds of pages and everytime a visitor browses to another page on your site, the background music starts playing again. If I were your visitor, I’d just turn off my speakers or leave your site. Moreover, they just add to the visitors burden when viewing your site — users on dial up connections will have to wait longer just to view your site as it is meant to be viewed.
(more…)

HTML vs. XHTML

Thursday, October 4th, 2007

vs

XHTML 1.0 is a reformulation of HTML 4.0. What this really means is that learning XHTML is basically the same as learning HTML. The main difference is a few simple rules - as XHTML is more strict than standard HTML.

[1] Stricter adherence to the HTML specification
Many browsers are very lax in how they interpret HTML. This leads to incongruities in how the pages are displayed, and XHTML doesn’t allow that. The best way to correct this is to use an XHTML validator such as HTML Tidy.

[2] Write well formed documents
What this generally means is avoiding overlapping elements. The following nested code is acceptable: <p>Paragraph <em>emphasized</em></p> because the <em> tag is opened and closed within the <p> tag. However, this is not allowed: <p>Paragraph <em>emphasized</p></em> because the <em> tag overlaps the <p> tag.
(more…)