Background color source code
Solved
Mehdi-Amg
Posted messages
95
Registration date
Status
Membre
Last intervention
-
Techno01 -
Techno01 -
Hello,
I'm looking for the source code to set a background color for text but not for the entire page, just at the top, as if I were creating a banner with the website title. I hope you understand what I mean.
Thank you in advance!
Configuration: Mac OS X / Safari 534.51.22
I'm looking for the source code to set a background color for text but not for the entire page, just at the top, as if I were creating a banner with the website title. I hope you understand what I mean.
Thank you in advance!
Configuration: Mac OS X / Safari 534.51.22
I'm saying this just so that others can benefit..
you should know that this is called CSS programming, almost all websites contain CSS code
<html>
<head>
<meta charset="utf-8">
<title>Page</title>
<style type="text/css">
.banner
{
width:100%;
height:160px;
background-color:green;
text-align:left;// you can use right or center instead of left to position the text
}
.text
{
color : #f00;
/*you can invoke colors by 3 methods
1 : The name of the color like purple
2 : Hex notation #FF0000 or #f00
3 : Or by rgb|red green blue| for example rgb(255,0,0)
}
</style>
</head>
<body>
<div class="banner">
<p class="text">Your text</>
</div>
</body>
</html>