Best way to learn web design, business web design, graphic web design, web design development, web design services
Sunday, November 15, 2009
CSS and the End of Tables
CSS and the End of Tables In the bad old days of the Web, the only way to create a 'complex layouts was to use tables. Some sites stupid series of tables, one inside the other, relatively simple to create forward. With CSS, however, the tables may finally be replaced. What is so bad about tables? If you have never worked with a site that uses tables, it is difficult to know how it is. HTML code is transformed into a chaos of confusion of lines and columns, no clear markers of the parties to do what the page. If you want to redesign the site, you are obliged to try to extract the contents of your HTML and start building the new tables. Tables, creating Web pages has become very much for building a house of cards. What is CSS? CSS means Cascading Style Sheets. CSS style information allows certain parts of your HTML code, identified by name tags, or ID and the classes that you specify. This is done using CSS selectors. CSS selectors The first thing you need to know about CSS is like the foundation of the work of selectors. There are a lot of esoteric and selectors, mostly useless, but the basics are not too difficult to understand. CSS is based on the labels which are the classes and IDs - the only difference between a class and an identity document is a document of identity that refers to one and only one label, while a class may refer to more than one. If only the brand name alone, then your CSS rules at all labels. If you use a name followed by a dot and the name of a class, then it will affect all those labels of class. The use of a mark, an ID and a hash only affect the name of the mark with id. Using the hash ID and the only work on identification of each tag, when using a point and the class name through the books in any class label. Then: p - all p.thing points - all points of the "thing" p # class thing - the point with the ID "thing". thing - all the labels of "what" # class thing - the identification tag with the 'what' to add rules for each of these selectors, you just put braces (()) then, and then make the rules in space - all it takes to create CSS. CSS Code Useful CSS rules like this: name rules: the creation, these are some of the most useful rule settings and the various names that can be applied to them. background-color. You can define a background color of the page using HTML color (similar to this: # 123456). color. Set the colors for text. font-family. Allows you to set the font for the text - you can add more than one font name, separated by commas, in case your first choice is unavailable. font-size. You can set the font size in px or em - it is better to use em, and that these measures are relative rather than absolute. width and height. Allows you to specify the width and height of things. You can use px or percentages. edge. The amount of space around the edges of some content. You can add a left, right, from top to bottom and the ability to specify the margins individually. filling. It works the same way as the margin, but the space between the edges of the label on the package and its contents, instead of the spacing between the label on the box and other boxes. border. Put borders around boxes. It takes three settings (width, type and color), so you have to put spaces between them, like this: border: 1px solid black; align text. Allows you to align text to the left or right, or in the middle (center). text-decoration. The monitoring of certain text effects - mainly used to stop the link is underlined, like this: a (text-decoration: none;) float. Indicates content floating on other content, rather than starting below it on a new line. This is the label most often used to simulate the type of effect can be achieved with tables - and create a floating div to the main content area outside of its width is one of the easiest ways to create a sidebar, for example.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment