Itsik Mauyhas Itsik Mauyhas - 1 year ago 69
CSS Question

Add constant size to border-style:dotted(CSS)

I have a

that has with
and I want to add fixed size for this element, example, if I add text to this span the size auto incearsed, is there a CSS proprety to add fixed size(creating a empty dotted element)?

code without fixed size:

<span style="border-width:1px;border-style:dotted;font-size:11pt"> <font face="David" class="ng-binding">

Answer Source

You need to add the display: block; CSS property with a width.

Try this:

<span style="display:block; width: 100px; border-width: 1px; border-style: dotted; font-size: 11pt">
    <font face="David" class="ng-binding">

Where the width value can be whatever desired width you want. I just used 100px as an example.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download