WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Pictures spaced differently in explorer and firefox (6 posts)

  1. moserengineering
    Member
    Posted 4 years ago #

    If you go to my site, http://www.jmoserengineering.com with explorer my page shows up how I want it to. However, if you go to it in firefox the pictures get moved together. Any idea how to fix this? Thanks.

  2. DigitalSquid
    Member
    Posted 4 years ago #

    It's because the hspace tag you've got on the second image is deprecated - only older browsers like IE7 will support. Firefox, Chrome, IE8, etc... are displaying it properly.

    Easiest way to fix it would be to create a CSS class with 64px margin on the left and right, and then add that class to the second image.

  3. moserengineering
    Member
    Posted 4 years ago #

    I am pretty new to websites so can you provide me with more guidance as to creating a CSS class with 64px margin on left and right. Below is the text in my header.php that I used to get the three pictures to separate. How would I incorporate the CSS class you are referring to. Thank you.

    <img src="<?php bloginfo('template_url'); ?>/images/image1.jpg" alt=" " /> <img src="<?php bloginfo('template_url'); ?>/images/image2.jpg" HSPACE=64 style="float:left" alt=" " /> <img src="<?php bloginfo('template_url'); ?>/images/image3.jpg" style="float:left" alt=" " />

  4. keesiemeijer
    moderator
    Posted 4 years ago #

    try this:

    <img src="<?php bloginfo('template_url'); ?>/images/image1.jpg" alt=" " /> <img src="<?php bloginfo('template_url'); ?>/images/image2.jpg"  style="float:left; margin: 0 64px;" alt=" " /> <img src="<?php bloginfo('template_url'); ?>/images/image3.jpg" style="float:left" alt=" " />
  5. DigitalSquid
    Member
    Posted 4 years ago #

    No problem.

    In your header.php, delete HSPACE=64 and replace it with class="img-margin"

    Then go to your style.css and enter this:

    .img-margin {
       margin:0 64px;
    }
  6. moserengineering
    Member
    Posted 4 years ago #

    thank you very much.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.