The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Trying to make sense of CSS

3 posters

Go down

Trying to make sense of CSS Empty Trying to make sense of CSS

Post by Bleachzor April 2nd 2010, 9:57 pm

OK so I've read several tutorials about the use of CSS but, I somehow can't seem to find a way to understand...

When I use firefox to view webpages I see they use divs and other but, can somebody tell me what to use them for, the english might be even a little bit to hard for me... and I'm not such a bright person so I'd like to hear an explaination of what they are and how they work...

I often see signs such as "#" "." and names such as "id" and "class"
Is there a way to explain what they are used for and how they work in a little bit more basic english?

thank you for your time
Bleachzor
Bleachzor
Forumember

Posts : 211
Reputation : -10
Language : Dutch

Back to top Go down

Trying to make sense of CSS Empty Re: Trying to make sense of CSS

Post by jackalraymaiden April 3rd 2010, 4:21 pm

well, Bleachzor, it's not as easy as ABC...., books about CSS can help you though. Cause its more of a language...the signs you see like "#" "." are commands that tells something to the script what it should do, and there are many of those signs.. and the names such as "id" and "class" define the thing that needs to follow the signs..

sorry, but I can't think of any clearer explanation ^^
avatar
jackalraymaiden
Forumember

Posts : 47
Reputation : 0
Language : Tagalog

Back to top Go down

Trying to make sense of CSS Empty Re: Trying to make sense of CSS

Post by Etana April 3rd 2010, 4:54 pm

Hello,


Css is easy it's always the same thing.


It's :

Code:
selector {
        property: value;
        property: value;
        property: value;
        property: value;
        property: value;
}
selector {
        property: value;
        property: value;
        property: value;
        property: value;
        property: value;
}
selector {
        property: value;
        property: value;
        property: value;
        property: value;
        property: value;
}
A selector choose the element to wich the property and value will go to.

For example for a post in phpbb2 the html is like this :

Trying to make sense of CSS 5pqwzq
In a selector, a word is a tag name, what follows a point is a class and what follows a # is an id.

For exemple with the screenshot above if I put :

Code:
div.postbody img
The div will select all div tag on the page.

Then in these div tag, only the ones with a class being postbody will be keeped.

And with img after, we select all img tag that are in the div tag with the class postbody.

Here is 4 examples page :



Cordially.
Etana
Etana
Forumember

Male Posts : 98
Reputation : 0
Language : French - English

http://kiniiri.forumactif.com/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum