1
<div id="demo" style="display: inline;">

<div style="color:#DD4814; font-weight:bold; font-size:25px;">Buscá tu colegio:</div>

<img src="Imagenes/info.png" title="Escribí el nombre <u>completo</u>. Si es un colegio no escribás 'colegio' o 'escuela' a menos que sea 'Escuela Normal', 'Escuela 1' o similar."/>
</div>

I tried display:inline I thought that was the way to do it. I couldn't anyway I'm sure it's easy. Thanks

Phrogz
  • 296,393
  • 112
  • 651
  • 745
lisovaccaro
  • 32,502
  • 98
  • 258
  • 410

2 Answers2

4

You only put inline on the first div. The other is a block element by default, which ensures that it will have a linebreak before and after it.

Oh, I just noticed that the second div is nested in the first. display: inline is not inherited. If you want the things inside the outer div to be inline, you'll need to make them inline.

Mud
  • 28,277
  • 11
  • 59
  • 92
  • nice one Mud. @Liso 22: It's also worth noting that it's generally considered bad practice to nest a block object inside an inline object: http://stackoverflow.com/questions/746531/is-it-wrong-to-change-a-block-element-to-inline-with-css-if-it-contains-another-b – Damien-Wright Dec 23 '10 at 03:11
3

Try setting display: inline on each individual element you want to appear on the same line, not the outer/containing element

Also, consider using a span for your text. You may also want to look into float for the image.

Kai
  • 9,038
  • 5
  • 28
  • 28