Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Extra margin in span tag?

Tags:

html

css

I have this code:

<span class="total white bold" style="background: #C2C555">TOTAL:</span>
<span style="background: #C2C555; margin: 0;">1 night</span>
<span class="cost">€ 120.00</span>

I expected the three spans would be together, but there is a space between them.

How to remove that space?

I'm using Chrome.

Regards

Javi

like image 772
ziiweb Avatar asked Feb 23 '23 14:02

ziiweb


1 Answers

Remove the line-breaks, i.e.

<span class="total white bold" style="background: #C2C555">TOTAL:</span><span style="background: #C2C555; margin: 0;">1 night</span><span class="cost">€ 120.00</span>

jsFiddle: http://jsfiddle.net/LECBb/

like image 107
stealthyninja Avatar answered Feb 26 '23 09:02

stealthyninja