Munksgaard Munksgaard - 2 months ago 9
CSS Question

Why won't my image go on the next line?

I think i tried everyting. There must be something i don't understand. I have done this, the same way, on another page, and it seems to work fine. But now, it doesn't. What is wrong?



#musik {font-family: Verdana; float: left; font-size: 30px}
#xdj {width: 650 px; height: 450px}

<strong><p id="musik"> M U S I K </p></strong>
<br>
<img id="xdj" src="xdj.jpg" alt="xdj-rx">





I just wan't my picture, to be under the headline..

Answer

Your code is kinda messy.

I've cleaned it up and gave a solution, see the comments in the code.

#musik {
  font-family: Verdana;
  /* float: left; remove this line */
  font-weight: 900; /* add this line, so you can remove the <strong> element */
  font-size: 30px
}
#xdj {
  width: 650px;
  height: 450px
}
<p id="musik"> M U S I K </p>
<img id="xdj" src="http://placehold.it/650x450" alt="xdj-rx">