How to integrate a horizontal band in CSS

Solved
Aurèli1s Posted messages 209 Status Member -  
Kopros Posted messages 631 Status Member -
Hello,

Let me explain, I want to add a horizontal band in the background with a given width, but that takes the entire width of the site, at the top, and with a defined color.

Thank you in advance!

Configuration: Windows XP / Firefox 5.0

3 answers

  1. Kopros Posted messages 631 Status Member 89
     
    In your message, you say that you want a vertical band; I imagine you meant horizontal.
    If that's the case, in the HTML code, you can put this right after the <body> tag:
    <div id="bande_horizontale"></div>

    And in the CSS:
    #bande_horizontale{
    padding: 0px;
    margin: 0px;
    border: none;
    width: 100%;
    height: 50px;
    background-color: #FEB201;
    }

    For the width, you modify the height; for the color, you can choose it, for example, from this site: https://www.code-couleur.com/

    If you want to add a border, you replace border: none with something like
    border: solid 1px black;
    15