The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › make a border fit around text that does not work
hi.guys I have two span that have border and i want border fit only around text not tag .but border of first span not fully fit around text.how to fix it.
span{ margin:0 auto; font-size:40px; border: 1px solid blue; display: inline; position: relative; }
<span> hello </span> <span> wellcom </span>
https://www.imageupload.co.uk/images/2018/02/07/IMG_20180206_213724.jpg
There is default space between inline items.
You can eliminate this in various ways..
https://stackoverflow.com/questions/5078239/how-do-i-remove-the-space-between-inline-block-elements
thanks,
i change display to inline-block and remove space between spans