Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 15 of 15
  1. #1
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Why no gap between <acronym> and <a> ???

    I've got some perfectly valid XHTML on this page that when viewed in Mozilla creates an odd behavior.

    The problem
    The space between my <acronym> tag and my <a> tag doesn't show up in Mozilla.

    The code
    Code:
    <acronym title="Web Standards Project">WaSP</acronym>&amp;nbsp;<a href="http://www.webstandards.org/act/campaign/buc/">website</a>
    Looks ok in IE. Any clues? I've also tried this with a regular space, a regular space on either side or both sides of the &amp;nbsp; and even en &ampemsp;
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Just a guess, but would

    acronym { display:inline; }

    make a difference ..?

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for the idea brothercake, but no dice.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Maybe use a different tag ... not familiar with <acronym> - does it have a semantic purpose over, say, a <span> ??

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by brothercake
    Maybe use a different tag ... does <acronym> have a purpose that makes it more useful than, say, a <span> ??
    Yes!

    <acronym title="Maine School of Science and Mathematics">MSSM</acronym>

    Provides enough information for "MSSM" to be understood.

    If I was talking about my high school on a web page, what does <span>MSSM</span> mean? Nothing at all. <acronym> provides a clean way of defining acronyms so that people not in the know can still understand them.

    Mozilla even provides visual hints for <abbr> and <acronym> with a dotted underline.

  • #6
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, jkd. And you're right, I have noticed that Mozilla gives the little dotted underline when not styled by CSS.

    <acronym> is no different from any other phrase element such as em, code, cite, etc...

    So, jkd, any clue why I'm not getting my space?
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #7
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Originally posted by beetle
    So, jkd, any clue why I'm not getting my space?
    I see a space when the page is loading, however after the page is done, it collapses. Very, errr... peculiar behavior.

    I'm going to look into it a bit more throughout the day.

  • #8
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    I can tell you it is not a recent regression at least.

    I've looked at it in various 1.1, 1.2, and 1.3 builds, as well as various Phoenix releases and K-meleon 0.7, only to get the same behavior each time.

    And don't ask why I have 7 different Gecko browsers on my hard drive... I don't know either.
    It helps a little for regression hunting, but if I did it for that, I would grab 1.02 or something as well...

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Strange indeed,because Konqueror does display a space.

    I have noticed that when you create a XHTML page with the .xhtml extension Konqueror does not display spaces around acronyms (but Mozilla does).

  • #10
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    	<head>
    		<title>&lt;acronym&gt; test</title>
    	</head>
    	<body>
    		The <acronym title="Maine School of Science and Mathematics">MSSM</acronym> <a href="http://www.mssm.org">here</a>
    	</body>
    </html>
    Works as expected in Moz. I was thinking that the collapsed space might have something to do with the immediate anchor afterwards, but obviously that is no longer the case. With markup rendering out of the way, I'm afraid it might be a styling system issue, which may hard to pinpoint. I'll keep thinking about it though.

  • #11
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by jkd
    Yes! [...]
    That's interesting; thanks.

    I tried the example in Moz 1.2a and Netscape 7.01 and it works absolutely fine ..?
    Last edited by brothercake; 01-10-2003 at 08:08 PM.

  • #12
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by jkd
    I see a space when the page is loading, however after the page is done, it collapses. Very, errr... peculiar behavior.
    Argh!!! jkd, I'm glad you said that becuase it made me look at my code again, closely.

    When I started building this site I was using one of those whitespace cleaner functions for Mozilla. Since further educating myself on the subject I opted to discontinue it's use. However, it appears That at some point I overwrote my files with a version that still had the mentioned cleaner function intact, and it's been there ever since.

    Removing that function (again) fixes the problem. Thank you all for being patient with my boneheadedness.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #13
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    LOL! I never expected that one.

  • #14
    New Coder
    Join Date
    Dec 2002
    Location
    Florida
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    <acronym title="Maine School of Science and Mathematics">MSSM</acronym>

    Provides enough information for "MSSM" to be understood.

    If I was talking about my high school on a web page, what does <span>MSSM</span> mean? Nothing at all. <acronym> provides a clean way of defining acronyms so that people not in the know can still understand them.


    Just as an aside:

    <span title="Maine School of Science and Mathematics">MSSM</span>

    ...works in the same way as what you wrote.

    But, since you got your problem fixed, it was just an interesting point. Also, not sure if it's cross-browser compatible or not.

    MrDoubtFIre

  • #15
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes, MrDoubtFire, that is true. And it's not.

    The resulting title tooltip is the same for both, but consider these differences. And <acronym> is perfectly valid HTML.

    The <acronym> tag denotes acronym, just the same way <b> denotes bold, <code> denotes code and <em> denotes emphasis. <span> denotes nothing. <span> and <div> are customizable line-level and block-level elements that carry no semantic meaning of their own.

    Also, consider this. Let's say (as on my site) you want all of your acronyms to have a specific underline. Using <span>s I'd have to assign a class to each one and style them with a class selector. Using <acronym>s I'd just have to style them with an element selector. Much easier =)

    Oh, and as it's been mentioned, Mozilla render's unstyles <abbr> and <acronym> elements with a dotted underline.
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •