HOW we can use css
Answers were Sorted based on User's Feedback
Answer / sekar
CSS stand for Cascading style sheet.
it used to applying style for both HTML and XML document.
there are three way applying style
1.internal style.
2.external style.
3.inline style.
here is the example for use css
<html>
<head>
<title>sample</title>
<style type="text/css">
.top-left
{
float:left;
width:400px;
height:100px;
background-color:#000;
}
.top-right
{
float:left;
width:378px;
height:100px;
background-color:#000;
}
.body
{
float:left;
width:778px;
height:400px;
}
.bottom
{
float:left;
width:778px;
height:30px;
background-color:#000;
}
</style>
</head>
<body>
<div class="top_left">
</div>
<div class="top_right">
</div>
<div class="body">
</div>
<div class="bottom">
</div>
</body>
</html>
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / thoms
As sekar said css is broadly classified into following 3 types:
External Style Sheet:
An external style sheet is ideal when the style is applied to many pages. With an external style sheet, you can change the look of an entire Web site by changing one file. Each page must link to the style sheet using the <link> tag. The <link> tag goes inside the head section:
<head>
<link rel="stylesheet" type="text/css"
href="mystyle.css" />
</head>
Internal Style Sheet:
An internal style sheet should be used when a single document has a unique style. You define internal styles in the head section by using the <style> tag, like this:
<head>
<style type="text/css">
hr {color: sienna}
p {margin-left: 20px}
body {background-image: url("images/back40.gif")}
</style>
</head>
Inline Styles:
An inline style loses many of the advantages of style sheets by mixing content with presentation. Use this method sparingly, such as when a style is to be applied to a single occurrence of an element.
To use inline styles you use the style attribute in the relevant tag. The style attribute can contain any CSS property. The example shows how to change the color and the left margin of a paragraph:
<p style="color: sienna; margin-left: 20px">
This is a paragraph
</p>
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vipin gurjar
we can use css by using many methods it depends that u want
to user external style sheet or internal.
For external style sheet user simple syntax in head tag
<link type="text/css" href="file.css" style="stylesheet">
and internal style sheet is also 3 types but u can write
code by using and ending these tags
<style>
::code
</style>
Is This Answer Correct ? | 2 Yes | 0 No |
How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain
1.Where are the cookies storing ? 2.What is the drawback of using cookies ? 3. If two site is having same cookie name and different values what will be the output if we echo the cookie name from those sites ? How can we solve this issue (How can we specify the domain name)?
What types of Data Can Be Used as Array Keys?
How to add a cookie?
How to define a function with any number of arguments?
Do you know what is the difference between mysql_fetch_object() and mysql_fetch_array()?
What are the advantages of indexes in php?
difference of move(), and copy() function in php?
What are some of the advanced features of php?
Explain what is the difference between for and foreach?
How I use global variable in another page without using $_GET method?
What is rtrim php?