Category: Cascading Stylesheet (CSS)

CSS Image Flip

[ No Comments ] Posted on November 20, 2008 under Cascading Stylesheet (CSS)

An alternative to Java Image Flip. This image flip uses CSS instead of Javascript to replicate exactly the same effect. Some people block Javascript in their browsers because some malicious websites use them to infect computers with malwares. Hence, I develop an image flip that works even if the Javascript is disabled.

Centering a fixed-width webpage using auto margin

[ No Comments ] Posted on November 7, 2008 under Cascading Stylesheet (CSS)

One way of centering all the elements of a webpage in a fix-width layout is by setting the margin of the outermost block element to some value and auto. Without this configuration, the default setting for most browsers is to flush all elements to the left. Note that there is no such thing as float:center; and the text-align:center; does not work in divisions.

CSS and Javascript outside the HTML file

[ 2 Comments ] Posted on October 31, 2008 under Cascading Stylesheet (CSS), Hypertext Mark-up Language (HTML), Javascript, Search Engine Optimization (SEO)

Aside from placing CSS and Javascript within the head section of the HTML, we can also place them in separate external files. This enables several HTML webpages to access and use them. The results: uniform appearance of the website across several pages, elegant and simpler HTML code, and a search engine friendlier website.

Designing a simple website layout using CSS

[ No Comments ] Posted on October 18, 2008 under Cascading Stylesheet (CSS)

This article explains how to design a simple website with two columns (content and side menu), header and footer. The dimensions are fixed. Even though it is unlikely that anyone will develop a website with such a rigid layout, this article serves as a prerequisite to all website layout tutorials.

Why use CSS in layouting a website instead of tables

[ No Comments ] Posted on October 10, 2008 under Cascading Stylesheet (CSS), Search Engine Optimization (SEO)

CSS layout is superior to table layout for two reasons: first, webpages with CSS layout have greater chance of reaching the top of search engine results than table layout and second, CSS layout enables the webpages across the same website to have consistent appearance and format without the need to edit the pages one by one.

Next Entries »