Softpedia
 

NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home > News > Webmaster > Tips and Tricks

June 3rd, 2008, 16:12 GMT · By Catalin Bocanu

A Simple Liquid Template Example

SHARE:

Adjust text size:


CSS Template Example
Enlarge picture
Website creation is very simple when the content is separated from layout through templates. The appearance of published content will be determined by the position of various elements inside a certain template.


According to a certain web programming language, there are many types of templates available for free download and customization. Widely used, CSS (Cascading Style Sheets) plays a crucial role in formatting the HTML content of any website, providing multiple advantages in template construction and customization, such as flexibility, low file size, the possibility to implement various visual effects in HTML without the need of client side or server side scripts and more.

As a consequence, HTML templates styled with CSS will provide you with multiple options in content publishing. There are two possibilities when you define the website layout: it could be fixed or liquid. The liquid layout allows the website elements to change their relative position as a function of the dimensions of the web browser windows, as opposed to the fixed layout where the webpage will expand or contract with all elements remaining in place, fitting in the current window.

Let's consider the next HTML code (template.html), which defines a template having two DIV elements (columns):


In order to create a liquid template, the myStyle.css has to have the next structure:

CODE
#menu {
float: right;
width: 30%;
}
#thecontent {
margin-right: 25%;
}

According to the CSS specifications in the external file myStyle.css, the template navigation system (menu) will "float" to the right, as a box element occupying 30% of the browser window. The website content will be published in the left of the page with a relative distance of 25% from the right menu box (column).

In the HTML code, the two DIV containers will define a website layout formed by two columns vertically oriented. In the absence of CSS code, the position of the DIV containers would be horizontally oriented, without a clear delimitation between them: the text from one column could appear superposed over the other one.

You can modify the percentages that define how much of the browser window is occupied by every column to notice the modification of template structure. You can also easily change the HTML and CSS code in order to create a three column layout for your template.

TELL US WHAT YOU THINK:

10,500 hits · 6 comments · Link to this article · Print article · Send to friend · Subscribe to news

MUST-READ RELATED ARTICLES:


Free Acrobat.com Online Service Suite

Installation of Diferior on Windows

YouTube Videos Presentation Alternatives

Pixie Website Maker

Website Creation with Drupal

READER COMMENTS:


Comment #1 by: chlorophyll on 24 Sep 2008, 13:30 UTC reply to this comment

VERY INTERESTING ARTICLE, SO MANY USEFUL INFORMATIONS, IT'S HELPFUL FOR ME AND I THINK FOR MANY OTHER USERS :) THX


Comment #2 by: VINIT PRATAP SINGH on 25 Sep 2008, 05:02 UTC reply to this comment

Very usefull information.. thanks a lot..


Comment #3 by: tworzenie stron on 19 Oct 2008, 13:27 UTC reply to this comment

VERY INTERESTING ARTICLE, SO MANY USEFUL AND HELPFUL TIPS, I THINK IS GOOD IDEA! THANKS FOR NICE READING :)


Comment #4 by: polish websites on 01 Nov 2008, 17:03 UTC reply to this comment

NICE TUTORIAL!
Very interesting and useful informations.
This looks good! Really good tutorial include so many helpful informations!
Excellent SITE. I will refer people to your ITEMS.


Comment #5 by: cornice london on 22 Nov 2008, 19:19 UTC reply to this comment

Excellent SITE. I will refer people to your ITEMS. Effective use of Wordpress had some exceptional.
Cheers


Comment #6 by: no nick on 16 Dec 2010, 05:18 UTC reply to this comment

Wtf ? Is this a scam ?

Copyright © 2001-2012 Softpedia. Contact/Tip us at

WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM