treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Image Placement

  • Okay, I have an image of a moth and it is supposed to be at the base of the page (between the content and footer). But right now, it is showing at the right of the content, here. I do not know how to fix it. Here is the CSS code that I have for it:


    .moth {
    height: 40px;
    width: 56px;
    margin: 14px 367px;
    display: block;
    }


    And here is how I am calling it:

    <img class="moth" src="http://www.gloomthenovellas.com/wp-content/themes/default/images/moth.png&quot; alt="moth"/>


    Thank you in advance!
  • Looks fine to me. In what browser do you see it showing to the right?
  • Weirdness. I am using Mozilla Firefox.
  • Instead of adding in empty divs, why don't you just add a margin to your paragraphs? What you're doing now would be considered very bad practice. http://cl.ly/0J0e2a2m0D1K101O0K3d

    To fix Firefox, you can add clear:both; to .moth.
  • Yeah, I am not even sure if I would consider myself a coder yet. Haha! I get caught up by the simplest things and I do not seem to learn from my mistakes (when it comes to coding). I have actually been meaning to add that 14 pixels of margin to the p tag for a while now. I should probably get on that. And thank you for the fix!