Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Header cant have a border

Tags:

css

header

border-width doesn't work.

header {
    background-color: #58ACFA;
    text-align: center;
    border-width: 5px;
    border-color: black;
}

I tried to use border-size and it did not work.

How can I do it?

like image 285
Ninjacu Avatar asked Jun 25 '26 12:06

Ninjacu


2 Answers

header {
    background-color: #58ACFA;
    text-align: center;
    border-style: solid;
    border-width: 5px;
    border-color: black;
}

you prob. forget a border-style. I added it for you. It can also be done on one line

border: 5px solid #000;
like image 95
Blazer Avatar answered Jun 29 '26 11:06

Blazer


Try:

header {
    background-color: #58ACFA;
    text-align: center;
    border: 5px solid black;
}

Which is the same as

header {
    background-color: #58ACFA;
    text-align: center;
    border-style: solid;
    border-width: 5px;
    border-color: black;
}
like image 22
Daniel Avatar answered Jun 29 '26 12:06

Daniel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!