When a layout of a web page is set as liquid, then the html objects on the web page adjust their position and size to fit themselves on the visible portion of screen. The liquid layouts are also known as responsive designs, and are best when the page is also need to be opened on
When we define layout of an html document to be fixed, the size and position of the html components will stay same even if we decrease the size of web page. In other words, the html page will not be responsive. In fixed layout, we assign widths using pixel units. The following is a complete
It is also possible to assign multiple css classes to a single html object. In that case, the names of the css classes will be written in “class” property of html object with spaces. In the following example, the second paragraph tag P is assigned with two classes, the myclass2 is changing the color of
It is preferable to put all the css related code and classes in a separate file, and include that file in the html document in which we want to apply properties of those class. The following is code of a style sheet: stylesheet.css @charset "utf-8"; /* CSS Document */ .note { font-family:Verdana, Geneva, sans-serif; color:#06C;
In CSS, wild card * can also be used to apply the property of class to all the objects in the document. In the following example, the properties defined in * are applied to all the objects <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Untitled Document</title> <style> * { color:#00F; } </style> </head> <body> <h1>
It is also possible to assign a css class to an HTML object using the ID property of html object. To do that, the css class name is prefixed with a hash (#) sign. In the following example, the css classes are defined whose name are the name set in ID properties of HTML objects
Cascaded Style Sheets are used to set the layout of html objects. Various design related properties are grouped in css “classes”. There are various methods to define a class. If a class name is same to an html object, then the properties defined in the class are automatically applied to all the html objects with