1

Using Dreamweaver, if I select 'Apply source formatting' it often occurs that two asp.net tags (for example a textbox and a button) are put on separate lines, resulting in a space between them when viewing in a browser. You can use css float:left on the elements to avoid this, but the disadvantage of using float is that you always have to take care of the position of the first element after the floating elements. So my question is: are there any other options in this case?

esims
  • 165
  • 1
  • 15

2 Answers2

2

1 . Setting display:block in css

2 . You can use comment like this:

<img src="..." alt="..."><!--
--><img src="..." alt="..."><!--
--><img src="..." alt="..."><!--
--><img src="..." alt="...">
Sour LeangChhean
  • 4,895
  • 4
  • 29
  • 35
0

There are two ways to avoiding this

1 Using display:float poperty as you said.

2 Using font-size:0px; to parent wraper. In that case you can avoid your problem.

For examples cheack below jsfddle

Mr.Pandya
  • 1,331
  • 1
  • 10
  • 20