"_" Character appearing before Img

Discussion in 'HTML' started by Aaron, Mar 18, 2006.

  1. Aaron

    Aaron Guest

    I have a strange little annoyance.

    What would cause a short "_" to appear on an simple html page just before an
    image?
    Its seems to be visible in IE6 & Firefox, different PCs.

    Ex. http://www.garyluttrell.com/ContactLuttrell.htm

    Any suggestions appreciated.
    Aaron, Mar 18, 2006
    #1
    1. Advertising

  2. In article <pDVSf.7$>, says...
    > I have a strange little annoyance.
    >
    > What would cause a short "_" to appear on an simple html page just before an
    > image?
    > Its seems to be visible in IE6 & Firefox, different PCs.
    >
    > Ex. http://www.garyluttrell.com/ContactLuttrell.htm
    >
    > Any suggestions appreciated.


    It's because there's whitespace before the image, which is part of a
    link. Change this snippet

    ....htm">
    <img src="makepayment1.gif" ...

    to
    ....htm"><img src="makepayment1.gif" ...

    --

    Hywel
    http://kibo.org.uk/
    Hywel Jenkins, Mar 18, 2006
    #2
    1. Advertising

  3. Aaron

    Ed Mullen Guest

    Ed Mullen, Mar 18, 2006
    #3
  4. Aaron wrote:

    > I have a strange little annoyance.
    >
    > What would cause a short "_" to appear on an simple html page just before an
    > image?
    > Its seems to be visible in IE6 & Firefox, different PCs.
    >
    > Ex. http://www.garyluttrell.com/ContactLuttrell.htm
    >
    > Any suggestions appreciated.
    >
    >


    Whitespace: spaces, tabs, carriage returns...
    <a href="somewhere">*whitespace here*<img src="myimage.jpg></a>
    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 18, 2006
    #4
  5. Aaron

    Aaron Guest

    "Ed Mullen" <> wrote in message
    news:...
    > Aaron wrote:
    >> I have a strange little annoyance.
    >>
    >> What would cause a short "_" to appear on an simple html page just before
    >> an image?
    >> Its seems to be visible in IE6 & Firefox, different PCs.
    >>
    >> Ex. http://www.garyluttrell.com/ContactLuttrell.htm
    >>
    >> Any suggestions appreciated.
    >>
    >>

    >
    > did you fix it? Not showing here in Firefox, IE7, Opera, nor SeaMonkey.
    >
    > --
    > Ed Mullen
    > http://edmullen.net
    > http://mozilla.edmullen.net
    > http://abington.edmullen.net


    Thanks

    That fixed the top MakePayment but there was no space in the html of the
    lower Map&Directions image.
    Aaron, Mar 19, 2006
    #5
  6. Aaron wrote:
    <SNIP>
    > That fixed the top MakePayment but there was no space in the html of the
    > lower Map&Directions image.
    >
    >


    Yes there is a carriage return between the opening A tag and the open
    FONT tag (which BTW your should not use) Check out the rest of your errors

    http://validator.w3.org/check?verbose=1&uri=http://www.garyluttrell.com/ContactLuttrell.htm

    Result for http://www.garyluttrell.com/ContactLuttrell.htm - W3C Markup
    Validator

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 19, 2006
    #6
  7. Aaron

    Noozer Guest

    > That fixed the top MakePayment but there was no space in the html of the
    > lower Map&Directions image.


    No, but there is a line break.

    An ugly trick I use (and any comments are welcome) is to close the tag at
    the beginning of the next line. i.e.:

    <p>Here are some links:<br />
    <a href="link.one">Link One</a
    ><a href="link.two">Link Two</a
    ><a href="link.three">Link Three</a
    ></p>
    Noozer, Mar 19, 2006
    #7
  8. Noozer wrote:

    >>That fixed the top MakePayment but there was no space in the html of the
    >>lower Map&Directions image.

    >
    >
    > No, but there is a line break.
    >
    > An ugly trick I use (and any comments are welcome) is to close the tag at
    > the beginning of the next line. i.e.:
    >
    > <p>Here are some links:<br />
    > <a href="link.one">Link One</a
    > ><a href="link.two">Link Two</a
    > ><a href="link.three">Link Three</a

    >
    >></p>


    That can cause problems for HTML 4.01 Strict,
    better to wrap it this way:

    <a href="link.one">Link One
    </a><a href="link.two">Link Two...

    or

    <a href="link.one">Link One</a><a
    href="link.two">Link Two</a>...


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 19, 2006
    #8
  9. Aaron

    Aaron Guest

    "Jonathan N. Little" <> wrote in message
    news:441ce7e1$0$3701$...
    > Aaron wrote:
    > <SNIP>
    >> That fixed the top MakePayment but there was no space in the html of the
    >> lower Map&Directions image.
    >>
    >>

    >
    > Yes there is a carriage return between the opening A tag and the open FONT
    > tag (which BTW your should not use) Check out the rest of your errors
    >
    > http://validator.w3.org/check?verbose=1&uri=http://www.garyluttrell.com/ContactLuttrell.htm
    >
    > Result for http://www.garyluttrell.com/ContactLuttrell.htm - W3C Markup
    > Validator
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com


    So Jonathan
    I thought the HTML Declaration may have helped another problem on this page,
    but no.
    I have a strange space matter after the submit/cancel buttons, before the
    email address privacy paragraph.
    In that, there is No space viewing with Firefox, and a double space with
    IE6.
    Aaron, Mar 19, 2006
    #9
  10. Aaron wrote:
    <snip>
    > So Jonathan
    > I thought the HTML Declaration may have helped another problem on this page,
    > but no.
    > I have a strange space matter after the submit/cancel buttons, before the
    > email address privacy paragraph.
    > In that, there is No space viewing with Firefox, and a double space with
    > IE6.
    >
    >

    I am not looking at the source as parsed by a browser but at your
    actually source downloaded.

    You have no 'HTML Declaration' (which I think mean DocType)

    Your Code:
    <html><head><title>Luttrell Contact</title></head>
    <body><img src="ContactLuttrell_files/co...

    A doctype declaration goes before the <HTML> tag as thus:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>...

    But of course new pages should be HTML 4.01 strict, but your markup as
    is will be a big problem without correction.

    Stuff like this. your actual markup:

    </font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font><p>
    <font face="verdana" size="-1"><font color="red" size="1"><font
    color="black" size="-2"><font face="arial" size="-2"><font color="red"
    size="1"><font color="black" size="-2"><font color="red" size="1"><font
    color="black" size="-2"><font color="red" size="1"><font color="black"
    size="-2"><font color="red" size="1"><font color="black" size="-2"><font
    color="red" size="1"><font color="#808080" face="verdana"
    size="-2"><font size="2"><font color="#000000" face="verdana"
    size="-1"><br><br><br>
    </font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></font></p></form></body></html>

    What WYSIWYG editor did you use? That markup is a tell tail sign that
    you did. Dump the font element as use a stylesheet so this is unnecessary

    <hr align="left" color="#ff0000" width="70%">

    You could style your HR in a stylesheet with:

    HR { border: 1px solid #ff0000; #ff0000; width: 70%; margin-left: 0; }

    Then all you need is

    <hr>

    in your markup....

    All the FONT junk isn't required all you need if you want your page in
    sans-serif font is in your stylesheet

    BODY {
    font-family: Arial, Helvetica, Tahoma, Geneva, Gothic, sans-serif;
    font-size: 100%;
    }

    If you need to specify required fields then a class would do, say:

    ..required { color: #ff0000; }

    and in your markup:

    <label for="name">Your Name:<span class="required">*</span></label>

    Good luck you have your work cutout for you.



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 19, 2006
    #10
  11. On Sun, 19 Mar 2006, Jonathan N. Little wrote:

    [unholy scrapyard of </font> snipped...]

    > <hr align="left" color="#ff0000" width="70%">
    >
    > You could style your HR in a stylesheet with:
    >
    > HR { border: 1px solid #ff0000; #ff0000; width: 70%; margin-left: 0; }


    In theory, yes. When I tried this, some years ago, in the era when
    IE4 and NN4 still needed to be considered, I found that some browsers
    were quite reluctant to style <hr> itself, and I finished up with a
    plan which involved putting the <hr> (which I retained for fallback
    use when CSS was unsupported or disabled) inside <div>, and using CSS
    for styling the <div> (and for setting the hr width to 0 so that it
    didn't show). [1]

    Do we have current information on any residual problems with merely
    styling the <hr> itself?


    > All the FONT junk isn't required


    Amen to that.


    [1] if anyone's still interested in this history:
    http://ppewww.ph.gla.ac.uk/~flavell/www/hrstyle.html -
    but the content hasn't been substantively revised since 2002 or so.
    Alan J. Flavell, Mar 19, 2006
    #11
  12. Alan J. Flavell wrote:
    > On Sun, 19 Mar 2006, Jonathan N. Little wrote:
    >
    > [unholy scrapyard of </font> snipped...]
    >
    >> <hr align="left" color="#ff0000" width="70%">
    >>
    >> You could style your HR in a stylesheet with:
    >>
    >> HR { border: 1px solid #ff0000; #ff0000; width: 70%; margin-left: 0; }

    >
    > In theory, yes. When I tried this, some years ago, in the era when
    > IE4 and NN4 still needed to be considered, I found that some browsers
    > were quite reluctant to style <hr> itself, and I finished up with a
    > plan which involved putting the <hr> (which I retained for fallback
    > use when CSS was unsupported or disabled) inside <div>, and using CSS
    > for styling the <div> (and for setting the hr width to 0 so that it
    > didn't show). [1]


    I use to think that way of trying to fully accommodate 4x browsers until
    I started reviewing my traffic, <1% in fact in the .01% range! If it
    wall severely impair the page in these browsers a may add a conditional
    stylesheet that disables all the float and effect for them...No pretty
    but hey, then could upgrade.

    > Do we have current information on any residual problems with merely
    > styling the <hr> itself?


    Depends, if it fail, so what, just means the HR is not read and is
    'groove' style. Not sure why the OP wants 70% width anyway.

    >> All the FONT junk isn't required

    >
    > Amen to that.
    >
    >
    > [1] if anyone's still interested in this history:
    > http://ppewww.ph.gla.ac.uk/~flavell/www/hrstyle.html -
    > but the content hasn't been substantively revised since 2002 or so.


    If he redoes his page and used stylesheet in addition tom being easier
    to maintain and change but the markup will be nearly reduced my half.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 19, 2006
    #12
  13. On Sun, 19 Mar 2006, Jonathan N. Little wrote:

    > Alan J. Flavell wrote:
    > > In theory, yes. When I tried this, some years ago, in the era
    > > when IE4 and NN4 still needed to be considered, I found that some
    > > browsers were quite reluctant to style <hr> itself,

    [...]

    > I use to think that way of trying to fully accommodate 4x browsers
    > until I started reviewing my traffic, <1% in fact in the .01% range!


    Sure; I was talking about a page of mine that goes back to 1999.

    I was just interested to know whether there are still any known
    problems with styling <hr> in reasonably current browsers.

    > Depends, if it fail, so what, just means the HR is not read and is
    > 'groove' style.


    One can certainly hope that it would fail safely, then I'd have no
    argument with that.
    Alan J. Flavell, Mar 19, 2006
    #13
  14. Aaron

    Aaron Guest

    "Jonathan N. Little" <> wrote in message
    news:441daede$0$3704$...
    > Alan J. Flavell wrote:
    >> On Sun, 19 Mar 2006, Jonathan N. Little wrote:
    >>
    >> [unholy scrapyard of </font> snipped...]
    >>
    >>> <hr align="left" color="#ff0000" width="70%">
    >>>
    >>> You could style your HR in a stylesheet with:
    >>>
    >>> HR { border: 1px solid #ff0000; #ff0000; width: 70%; margin-left: 0; }

    >>
    >> In theory, yes. When I tried this, some years ago, in the era when IE4
    >> and NN4 still needed to be considered, I found that some browsers were
    >> quite reluctant to style <hr> itself, and I finished up with a plan which
    >> involved putting the <hr> (which I retained for fallback use when CSS was
    >> unsupported or disabled) inside <div>, and using CSS for styling the
    >> <div> (and for setting the hr width to 0 so that it didn't show). [1]

    >
    > I use to think that way of trying to fully accommodate 4x browsers until I
    > started reviewing my traffic, <1% in fact in the .01% range! If it wall
    > severely impair the page in these browsers a may add a conditional
    > stylesheet that disables all the float and effect for them...No pretty but
    > hey, then could upgrade.
    >
    >> Do we have current information on any residual problems with merely
    >> styling the <hr> itself?

    >
    > Depends, if it fail, so what, just means the HR is not read and is
    > 'groove' style. Not sure why the OP wants 70% width anyway.
    >
    >>> All the FONT junk isn't required

    >>
    >> Amen to that.
    >>
    >>
    >> [1] if anyone's still interested in this history:
    >> http://ppewww.ph.gla.ac.uk/~flavell/www/hrstyle.html -
    >> but the content hasn't been substantively revised since 2002 or so.

    >
    > If he redoes his page and used stylesheet in addition tom being easier to
    > maintain and change but the markup will be nearly reduced my half.
    >
    >
    > --
    > Take care,
    >
    > Jonathan
    > -------------------
    > LITTLE WORKS STUDIO
    > http://www.LittleWorksStudio.com


    Funny you should suggest the style sheet, I totally agree.
    This is my next version. I am just trying to learn HTML the hard way.
    http://www.garyluttrell.com/step3.htm

    The Declaration fixed the "_" on my May & Directions image.

    I have a lot to learn.

    Thanks
    Aaron, Mar 19, 2006
    #14
  15. Alan J. Flavell wrote:
    > On Sun, 19 Mar 2006, Jonathan N. Little wrote:
    >
    >> Alan J. Flavell wrote:
    >>> In theory, yes. When I tried this, some years ago, in the era
    >>> when IE4 and NN4 still needed to be considered, I found that some
    >>> browsers were quite reluctant to style <hr> itself,

    > [...]
    >
    >> I use to think that way of trying to fully accommodate 4x browsers
    >> until I started reviewing my traffic, <1% in fact in the .01% range!

    >
    > Sure; I was talking about a page of mine that goes back to 1999.
    >
    > I was just interested to know whether there are still any known
    > problems with styling <hr> in reasonably current browsers.


    Just in IE that I know of (surprise, surprise) if you want to use an
    image instead of a border line you cannot get rid of the damn border in IE

    HR {
    border: 0;
    background-image: url(borderGfx.gif);
    background-repeat: repeat;
    height: 25px;
    }

    >
    >> Depends, if it fail, so what, just means the HR is not read and is
    >> 'groove' style.

    >
    > One can certainly hope that it would fail safely, then I'd have no
    > argument with that.



    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 19, 2006
    #15
  16. Aaron wrote:
    <snip>
    > Funny you should suggest the style sheet, I totally agree.
    > This is my next version. I am just trying to learn HTML the hard way.
    > http://www.garyluttrell.com/step3.htm
    >
    > The Declaration fixed the "_" on my May & Directions image.
    >
    > I have a lot to learn.
    >

    Better, but use 'Html 4.01 Strict' not 'Html 4.01 Transitional'.
    Rid all the inline styles and make CSS class for like styling then all
    you need is

    <ELEMENT class="yourClassName">...

    Then if you change your mind about your styling you only have to change
    it on one place, your stylesheet and not hunt though your document.
    Related dump the FONT elements. If you need to change the styling give
    the element a class. If the bit of text is not full portion contained
    within the element then put it in a SPAN and and style the SPAN.

    Do yourself a favor and download a copy of Firefox and install the
    WebDeveloper's bar, has a whole host of tools that will augment the
    learning process and has the links to the HTML CSS Validators that will
    help you locate your trouble spots...

    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com
    Jonathan N. Little, Mar 19, 2006
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.austin.rr.com

    how to download img from html img tag

    news.austin.rr.com, Apr 27, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    502
    Steve C. Orr [MVP, MCSD]
    Apr 27, 2005
  2. Philipp Lenssen

    Problem: <img></img>

    Philipp Lenssen, Jun 27, 2005, in forum: XML
    Replies:
    15
    Views:
    745
    David Håsäther
    Jul 3, 2005
  3. Jopek
    Replies:
    7
    Views:
    388
    dorayme
    Apr 26, 2009
  4. Michael J Whitmore

    Changing img's before printing...

    Michael J Whitmore, Nov 3, 2003, in forum: Javascript
    Replies:
    0
    Views:
    109
    Michael J Whitmore
    Nov 3, 2003
  5. Replies:
    7
    Views:
    169
    Tad McClellan
    Jun 22, 2006
Loading...

Share This Page