s4salman Posted February 11, 2009 Share Posted February 11, 2009 Dear i m newbie in css. I learnt somewhere to use external style sheet. i want to set web page body color, font size, font color, link color ( for links on black background) and link color 2 ( for links on white background color). can any body tell me how to write this in css. Quote Link to comment Share on other sites More sharing options...
haku Posted February 12, 2009 Share Posted February 12, 2009 Just do some online CSS tutorials. What you want to do is the most basic CSS, and you can learn it in less than an hour by doing some tutorials. Try HTML Dog. Quote Link to comment Share on other sites More sharing options...
alphanumetrix Posted February 13, 2009 Share Posted February 13, 2009 here are the basics to CSS: create a new file, call it style.css. then link to that file as shown below: <html> <head> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> </body> </html> Then, inside your CSS, edit your brackets as such: body { background:#YOURBGCOLOR; text-align:center; color:#FF0000; /*makes the font color red */ } To edit brackets, add classes and id's to them. Remember, though, that ID's are only to be used ONCE per document, and CLASSES are to be used more than once: <html> <head> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="frame">some text in our frame</div> </body> </html> then, add it to your CSS: body { background:#YOURBGCOLOR; text-align:center; color:#FF0000; /*makes the font color red */ } div#frame { /* the hash represents the ID */ background:none; text-align:center; float:center; position:static; } Now if you were to use it more than once, you'd make it a class, as shown below: <html> <head> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="frame">some text in our frame</div> <div class="frame">some text in our frame again</div> </body> </html> then, add it to your CSS: body { background:#YOURBGCOLOR; text-align:center; color:#FF0000; /*makes the font color red */ } div.frame { /* the period represents the class */ background:none; text-align:center; float:center; position:static; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.