I want to now how you can add a border around a canvas. So simply with the CSS code
border:black 3px solid;
you get the border in the canvas. And I dont want the border in the canvas. I want the border around the canvas. I want this with CSS.
Thanks for helping!
my css code:
#my_canvas {
max-width: 98%;
max-height: 98%;
height: auto;
width: auto;
margin:auto;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color:white;
border:black 3px solid;
}
#center {
max-width: 66.5%;
max-height: 95%;
height: auto;
width: auto;
margin:auto;
background:;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
Body {
background-color: slategrey;
}
outline: black 3px solid;
Outline will draw a line outside the element.
may i suggest this:
<canvas id="canvas"></canvas>
#canvas{
border:2px solid black !important;}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With