| | |
CSS syntax and commands
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
| View Poll Results: How many new languages and such do you regularly pick up from scratch? | |||
| Zero; I'm more of a specialist | | 0 | 0% |
| One; I like to keep a bit of excitement. | | 1 | 25.00% |
| Two or more; I plan to take over the world. | | 3 | 75.00% |
| Why are you asking such crazy questions? | | 0 | 0% |
| Voters: 4. You may not vote on this poll | |||
![]() |
Alright, I just started trying to do some CSS (I know, I have too much time on my hands) in order to make my own theme for firefox, so it matches my windows theme a little better.
However, I really don't know what CSS is, what the general syntax is, and would love a decent list of regularly-used commands. So, could you guys help me?
(more specific questions, cause we all like it better that way XD)
What is CSS and what is it most commonly used for?
How does the general syntax work? Equivalent expressions in HTML and C++ and BASIC work fine for me.
Could I get a short list of commonly-used commands, and their regular syntax?
Thanks a ton, everyone!
However, I really don't know what CSS is, what the general syntax is, and would love a decent list of regularly-used commands. So, could you guys help me?
(more specific questions, cause we all like it better that way XD)
What is CSS and what is it most commonly used for?
How does the general syntax work? Equivalent expressions in HTML and C++ and BASIC work fine for me.
Could I get a short list of commonly-used commands, and their regular syntax?
Thanks a ton, everyone!
Damn computer! It ate everything!
CSS which stand for cascading style sheets is used as an extension to HTML. These generally defines how to display the html tags, i mean to say its background color, foreground color, dimensions, postions etc...
For the most it prerequisite for building a good site, since it offers so many features and you cant create a good attracting page just using HTML(which is a foundation for building page).
i hope and assume that u r clear with ID's, CLASS's, ELEMENT's and ATTRIBUTE's.
you basic syntax is
or
or
or mix em all together
and if you want equivalent expressions for C++ , HTML or whatever, i can't help you since u cant compare a stylesheet eith c++. however there are certain thing in CSS which could be done through HTML also such as font-family/font-size/color etc...
some commonly used CSS properties are
margin, padding, display, background, background-image, color, font-family, font-size, border, text-decoration etc... infact every css property is important and helpful
.
you can go to http://w3schools.com/css/default.asp for a good CSS tutorial.
vishesh
For the most it prerequisite for building a good site, since it offers so many features and you cant create a good attracting page just using HTML(which is a foundation for building page).
i hope and assume that u r clear with ID's, CLASS's, ELEMENT's and ATTRIBUTE's.
you basic syntax is
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
element { statemen 1; statement 2; ----- -------------- statement n; }
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
.class { statemen 1; statement 2; ----- -------------- statement n; }
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
#id { statemen 1; statement 2; ----- -------------- statement n; }
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
element.class { statemen 1; statement 2; ----- -------------- statement n; } element #id { statemen 1; statement 2; ----- -------------- statement n; }
and if you want equivalent expressions for C++ , HTML or whatever, i can't help you since u cant compare a stylesheet eith c++. however there are certain thing in CSS which could be done through HTML also such as font-family/font-size/color etc...
some commonly used CSS properties are
margin, padding, display, background, background-image, color, font-family, font-size, border, text-decoration etc... infact every css property is important and helpful
.you can go to http://w3schools.com/css/default.asp for a good CSS tutorial.
vishesh
•
•
Join Date: Oct 2006
Posts: 4
Reputation:
Solved Threads: 0
Hi
Not sure if you have sorted this out yet, but thought I would drop you a line in case you are still in need of info on CSS.
In the first instance I would go to the following site www.w3.org and click the link to CSS in the column on the left hand side. You should find all you need to know here.
CSS is a very powerful way to control and maintain the appearance of your website. It is intended to separate the design/layout/appearance of the pages from the content. That is, use html to enter content and use (preferably external) style sheets to manipulate the colour, size, positions, etc. This way, if you suddenly decide to change the colour of all the title texts on all of you web pages, you can do this with one single alteration to a style sheet, rather than multiple (not to mention laborious) changes to each web page.
For example if in your style sheet you set up the following:
p.title
Not sure if you have sorted this out yet, but thought I would drop you a line in case you are still in need of info on CSS.
In the first instance I would go to the following site www.w3.org and click the link to CSS in the column on the left hand side. You should find all you need to know here.
CSS is a very powerful way to control and maintain the appearance of your website. It is intended to separate the design/layout/appearance of the pages from the content. That is, use html to enter content and use (preferably external) style sheets to manipulate the colour, size, positions, etc. This way, if you suddenly decide to change the colour of all the title texts on all of you web pages, you can do this with one single alteration to a style sheet, rather than multiple (not to mention laborious) changes to each web page.
For example if in your style sheet you set up the following:
p.title
•
•
Join Date: Oct 2006
Posts: 4
Reputation:
Solved Threads: 0
sorry ... accidentally posted before completing all the example. If you want me to finish, just let me know.
NB. One other point. Be aware that you can link more than one external css sheet to a given web page, that way to simplify maintenance, if certain colours, layouts, etc are specific to one or two pages but not all, you can keep this information in its own style sheet and link more than one style sheet to the page. Hope this helps.
NB. One other point. Be aware that you can link more than one external css sheet to a given web page, that way to simplify maintenance, if certain colours, layouts, etc are specific to one or two pages but not all, you can keep this information in its own style sheet and link more than one style sheet to the page. Hope this helps.
it is a very, very easy language I started learning it yesterday for 3 hours and I am already used to it.
Say you wanted to make all <P> tags a red colour, arial font and size 4 you would enter this in the head . . .
Say you wanted to make all <P> tags a red colour, arial font and size 4 you would enter this in the head . . .
<HEAD><STYLE TYPE="CSS">
P
{
text-size: 4;
color: red;
font-family: arial;
}
</STYLE></HEAD>
it is fairly simple, you then do this in the html body<P>Hello this will be red, arial size 4 text</P> hope i helped!! Last edited by josh06; Oct 26th, 2006 at 9:14 am. Reason: mistake in wriing
•
•
Join Date: Dec 2004
Posts: 1,655
Reputation:
Solved Threads: 35
CSS is not a programming language. It is a declarative language for defining styles. It has no variables, conditionals, loops, logic, or commands. If you want to "program CSS", what you need to learn is JavaScript. JavaScript is a scripting language for manipulating the browser Document Object Model, which includes assigning declared styles (CSS) to document elements (HTML).
![]() |
Similar Threads
- how to connect 2 pc"s together threwa router (Networking Hardware Configuration)
- check if Java is installed (Java)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: IE 7 and existing online ordering system not working
- Next Thread: Text Collapse
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp ajaxjspservlets animate automatically beta box browser bug captchaformproblem checkbox close codes createrange() css cursor debugger decimal dependent disablefirebug dom download dropdown editor element engine enter error events explorer ext file firefox form forms frameworks getselection google gwt gxt hiddenvalue highlightedword hint html htmlform ie7 ie8 iframe index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsp jump listbox maps masterpage math media menu microsoft mp4 object onmouseoutdivproblem onreadystatechange paypal pdf php player position problem programming progressbar prototype redirect regex runtime safari scale scriptlets search security select software sql text textarea unicode w3c window windowofwords windowsxp \n






