Space Under Images in HTML Newsletter

by skyvia
7 replies
  • WEB DESIGN
  • |
Hi there.

I am trying to create a html newsletter and I keep getting 2-3 pixels space under each image. I already made the borders=0 but the spaces are still there (only at the bottom)
Any ideas why this happens?

Thanx.
#html #images #newsletter #space
  • Profile picture of the author KathyK
    try something like
    Code:
    <img src="http://yoursite.com/yourimage" style="margin:0, padding:0">
    Note that on newsletters you have to use FULL URLs for everything because relative urls (ie images/myimage) will cause the email reader to look on the USER's computer (or in gmail/yahoo/hotmail). You are best using inline CSS, too, since webmail (like gmail) ignores anything in your
    Code:
    <head></head>
    area
    Signature

    Cheers,
    Kathy

    {{ DiscussionBoard.errors[3751959].message }}
  • Profile picture of the author dassad
    Yeap CSS way:

    Code:
    <img src="http://yoursite.com/yourimage" style="margin:0; padding:0;">
    HTML+Table way:

    Code:
    <table border="0" cellspacing="0" cellpaddig="0">
    Regards,
    daSSad
    {{ DiscussionBoard.errors[3752721].message }}
    • Profile picture of the author hedjunta
      I'm having the same issue..

      I applied both the the HTML+Table way to my table code and the CSS way to my in-line CSS.. when I inspect the element with firebug it's still adding 3 pixels to the bottom of the image, and creating a break.

      Any other ideas?
      Many thanks!
      {{ DiscussionBoard.errors[3831759].message }}
      • Profile picture of the author jamesg3
        Originally Posted by hedjunta View Post

        I'm having the same issue..

        I applied both the the HTML+Table way to my table code and the CSS way to my in-line CSS.. when I inspect the element with firebug it's still adding 3 pixels to the bottom of the image, and creating a break.

        Any other ideas?
        Many thanks!

        Man, dont use inline stylings, WC# is knocking that out. Add a style to a style sheet or something, lol. In-lines hurt!
        Signature
        Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
        Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
        {{ DiscussionBoard.errors[3831784].message }}
        • Profile picture of the author hedjunta
          Yes - definitely dont use in-line when possible, but from my (limited) experience with newsletters.. The mass-email services we've used don't allow for CSS.. so in-line seems to be the only way to get styles in..

          has anyone had a different experience?

          But would love to hear of a better way, I'm fully down to use a style sheet if possible, it's much better.
          {{ DiscussionBoard.errors[3831832].message }}
          • Profile picture of the author jamesg3
            Originally Posted by hedjunta View Post

            Yes - definitely dont use in-line when possible, but from my (limited) experience with newsletters.. The mass-email services we've used don't allow for CSS.. so in-line seems to be the only way to get styles in..

            has anyone had a different experience?

            But would love to hear of a better way, I'm fully down to use a style sheet if possible, it's much better.

            Well, i guess your stuck, unless you in-line code a refrence to a style css that you store on your own server somewhere, lol. that works too.
            Signature
            Serious Wordpress sites, html/css sites and flash sites Cheap. I provide killer SEO, easy to use e-commerce solutions and payment gateways. Check me out at Serious Website Design.
            Need Hosting with serious speed and power? 3.99 a month. Take a look here. Serious Website Hosting.
            {{ DiscussionBoard.errors[3832255].message }}
  • Why not just add a css block at the top of your html. It doesnt need to be in the head tags ...

    <body>
    <style>
    .header{
    margin: 0px;
    }
    </style>
    </body>
    </html>

    you can also use this ...
    <style>@import url("http://something.com/style.css");</style>
    {{ DiscussionBoard.errors[3832947].message }}

Trending Topics