hello
I use this code to set my background-color and my scrollbar color, but whatever I try, I can't seem to change my text-color. Can someone tell me how to edit that color ?
hello
I use this code to set my background-color and my scrollbar color, but whatever I try, I can't seem to change my text-color. Can someone tell me how to edit that color ?
try to use Css to change text color (not using it for headers)
.navy {color:#000080;}
.black {color:#00000;}
etc
HTML= <div class="navy"> etc
- Open up your text-based HTML editor. Open up a file so you can see and edit the source.
- Set up default colors. Create a tag: <style type="text/css"> and insert it before the body tags. After that, begin defining the colors of different types of text. For example, to make all the headlines blue, type: H1 {color: blue}. Define all the text types, each one on a separate line. When you are done, close the tag with </style>.
- Use default colors. After defining default colors, whenever you use that particular tag, it will be in your predefined color. For example, we have set H1 to blue, so if you were to type <h1> WOW! </h1> it would automatically be in blue.
- Make an exception. If you want something to be something other than the default color, then simply place the CSS tag within the HTML tag to change it on the fly. For example, to change headlines to red, you would type <h1 style="color: red"> Now it's Red!</h1>.
- Use contextual selectors. When defining defaults in the beginning, you can also set up more exceptions, based on context. For example, if you want all italics in the headline to be green, you would type: <h1 i "color: green">. Now, whenever you make something italic within a headline, it will be green, but outside it will be the default color.
try this
<html>
<head>
<style type="text/css">
h1 {color: #00ff00}
h2 {color: #dda0dd}
p {color: rgb(0,0,255)}
</style>
</head>
<body>
<h1>This is header 1</h1>
<h2>This is header 2</h2>
<p>This is a paragraph</p>
</body>
</html
if you wish to set the text color for the whole page, then use this code....
Code:
....if you wish to set the text color for a specific element, then use this code....<style type="text/css">
<!--
body {
color:#ff0000;
}
//-->
</style>
Code:
<style type="text/css">
<!--
.foo {
color:#ff0000;
}
//-->
</style>
...then add this to the element...
Code:
<div class="foo">this text will be red</div>
Bookmarks