Welcome to Dream.In.Code
Become an Expert!

Join 150,163 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,366 people online right now. Registration is fast and FREE... Join Now!




css classification

 
Reply to this topicStart new topic

css classification

IMU
26 Aug, 2008 - 09:46 PM
Post #1

New D.I.C Head
*

Joined: 7 Aug, 2008
Posts: 38

guys i am finding it difficult to understand css classification as i am new to css.i need help in this .i am referring w3schools.com tutorials for this css.
can any one help me out here.

and i need to known why do we call element?and the uses of element in css lang.
User is offlineProfile CardPM
+Quote Post

Martyr2
RE: Css Classification
26 Aug, 2008 - 10:07 PM
Post #2

Programming Theoretician
Group Icon

Joined: 18 Apr, 2007
Posts: 5,660



Thanked: 313 times
Expert In: C/C++, Java, VB, VB.NET, C#, PHP, Web Development, HTML & CSS, Javascript

My Contributions
Each tag (or tag pair) is called an element. <body></body> is an element. The text in between the opening and closing tag is said to be the content of the element. An element can contain other elements.

<body>
<p>This is a paragraph element inside a body element</p>
</body>

CSS definitions which match up with these elements. If we wanted to style the above <p> tag (as well as all p tags in the page) we would create a classification called p { style definitions }.

Now these style definitions inside the CSS curly braces can be classifications or style definitions which are used to position, flow, visibility etc of an element. Lets say that as my definition for a paragraph CSS statement I want to hide all the paragraphs on the page I could do something like this...

p { display: none; }

p is our CSS definition which defines the style for all <p> elements on the page. We use a classification called "display" which tells those elements to not display (aka none). "none" is said to be a property of the "display" classification. Other properties are "block" for making the element (in our case the <p> tags) a block element (which it is by default) or "inline" which will make the <p> elements act more like the <span> tag which is, by default, an inline element.

I don't find it terribly important to understand the actual name of "classification" as long as you know the parts of a CSS style. 1) Elements are the actual pieces of HTML markup on a page such as <div>, <span>, <p> and several other markup tags. 2) Style definitions control the appearance of these elements. 3) They contain style classifications which have properties to them. Other classifications include "float" for floating elements around the page, "z-index" for controlling which elements appear on top of other elements, "clear" for clearing the float classification on elements around the floated element, "clip" for clipping the content inside an element so its contents won't spill out, "cursor" for changing the cursor etc.

I hope I increased your understanding of the structure of CSS. smile.gif


User is offlineProfile CardPM
+Quote Post

IMU
RE: Css Classification
26 Aug, 2008 - 10:19 PM
Post #3

New D.I.C Head
*

Joined: 7 Aug, 2008
Posts: 38

thanks for the help Martyr2.it did help me to understand the meaning of element now and the concept of classification too..
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 02:50AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month