Hi i don't get why my span with border looks like this
this is the css behind
color:red;
font-size: 12px;
background-color: #ffcaca;
background-image:url(/Content/x.png);
background-size: 20px 20px;
background-repeat:no-repeat;
background-position:2px;
padding: 5px;
border-radius: 5px 5px 5px;
border: 1px solid red;
padding-left: 25px;
position:relative;
and html
<tr>
<td>
<span>[...]</span>
<td>
<tr>
block elements are a rectangle (thus block), and can have a border and float properties. inline do not have a border. you can turn a span into a block element via css, its clearer to use a div. as an asp:panel renders as a div, so it supports a border, just assign it a css class with a border property.
you can also use border style for this. apply border style and then get the border styling on the span element.
You can use the HTML span tag as a container to group inline elements together so you can style or manipulate them with JavaScript.
You can give display: block
to the span element or use div
element instead of using span
element.
I would prefer the latter one.
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