Jump to content

newbie help required


s4salman

Recommended Posts

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;

}

 

Link to comment
https://forums.phpfreaks.com/topic/144805-newbie-help-required/#findComment-761274
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.