<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of document</title>
</head>
<body>
<p>Hello stranger
<p>Welcome to the site
</body>
</html>
then you need to close your paragraph elements properly
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of document</title>
</head>
<body>
<p>Hello stranger</p>
<p>Welcome to the site</p>
</body>
</html>
then you apply a Class to the elements you want to style
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of document</title>
</head>
<body>
<p class="myClass1>Hello stranger</p>
<p class="myClass1>Welcome to the site</p>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of document</title>
<style media="screen" type="text/css">
.myClass1 {
color: white;
background-color : blue;
}
</style>
</head>
<body>
<p class="myClass1>Hello stranger</p>
<p class="myClass1>Welcome to the site</p>
</body>
</html>
If i put this code on a test html page i only get white background with the black letters - Welcome to the site nothing more it's like typing this bellow, can you see if you have made a mistake ?
Code:
<!DOCTYPE html>
<html>
<body>
<p>My first paragraph.</p>
</body>
</html>
So now "hello site" is blue white on blue background, but i want the entire row after that, to be blue also even though there is no text in it and the next row to be as default white..
I have problem.. so i'm using this now, but there is an extra row... The text in blue background is ok, but after that text there is empty row and after that is the regular text... there is no <br> or other.. how to remove this empty row... example:
Text in blue background:
(empty row that i need to remove)
My text on the page... so any ideas !?
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of document</title>
<style media="screen" type="text/css">
.myClass1 {
color: white;
background-color : blue;
}
</style>
</head>
<body>
<p class="myClass1">Hello stranger</p>
<p class="myClass1">Welcome to the site</p>
</body>
</html>
I found what i need, here it is :
<div style="background-color: #0099FF"><span style="color:white"><b><small>my site</small></b></span></div>
You really may want to look up more information on CSS, maybe jsut a beginners tutorial to get you started ( check out stickies in the CSS forum for suggestions) . If you style your pages like this, which is referred to as inline styling, it's going to make things more difficult for you in the long run.