How to keep this on one line?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • laredotornado@zipmail.com

    How to keep this on one line?

    Hi,

    I have a link and an image and I would like to keep them on the same
    horizontal plane. Right now, the image (named "close") is dropping
    below the text (that reading "New Tab"), despite the fact there are no
    carriage returns. The small bit of code is

    <a class="" href="#remote-tab-3"><span><di v>
    New Tab <span id="moduleCount 18" class="moduleCo unt">(0)</span>
    <a href="#" class="closeTab "><img name="close" src="images/
    miniclose.GIF" alt="" border="0"></a></div></span></a>

    I would prefer not to use TABLEs in crafting a solution. Here is the
    larger block in which it appears.

    <html>
    <head></head>
    <body>
    <ul>
    <li id="tab1"><a href="draw_modu les.php?tab_id= 1">
    General <span id="moduleCount 1" class="moduleCo unt">(7)</span>
    </a></li>
    <li id="tab6"><a href="draw_modu les.php?tab_id= 6">
    Learning Management <span id="moduleCount 6" class="moduleCo unt">(2)</
    span>
    </a></li>
    <li id="tab18"><a class="" href="#remote-tab-3"><span><di v>
    New Tab <span id="moduleCount 18" class="moduleCo unt">(0)</span>
    <a href="#" class="closeTab "><img name="close" src="images/
    miniclose.GIF" alt="" border="0"></a></div></span></a></li>
    </ul>
    </body>
    </html>

    Any help is greatly appreciated, - Dave

  • Bergamot

    #2
    Re: How to keep this on one line?

    laredotornado@z ipmail.com wrote:
    >
    I have a link and an image and I would like to keep them on the same
    horizontal plane.
    The small bit of code is
    In the future, please post a URL, not code.
    <a class="" href="#remote-tab-3"><span><di v>
    New Tab <span id="moduleCount 18" class="moduleCo unt">(0)</span>
    <a href="#" class="closeTab "><img name="close" src="images/
    miniclose.GIF" alt="" border="0"></a></div></span></a>
    Putting a block element (div) within an inline element (span, a) is
    invalid. Validate your code and you'll find errors like this yourself.
    W3C's easy-to-use markup validation service, based on SGML and XML parsers.



    --
    Berg

    Comment

    • Lars Eighner

      #3
      Re: How to keep this on one line?

      In our last episode,
      <1178743169.168 154.7270@e51g20 00hsg.googlegro ups.com>,
      the lovely and talented laredotornado@z ipmail.com
      broadcast on comp.infosystem s.www.authoring.html:
      Hi,
      I have a link and an image and I would like to keep them on the same
      horizontal plane. Right now, the image (named "close") is dropping
      below the text (that reading "New Tab"), despite the fact there are no
      carriage returns. The small bit of code is
      ><a class="" href="#remote-tab-3"><span><di v>
      New Tab <span id="moduleCount 18" class="moduleCo unt">(0)</span>
      <a href="#" class="closeTab "><img name="close" src="images/
      miniclose.GIF" alt="" border="0"></a></div></span></a>
      This is the biggest mess in four lines I have seen.
      A cannot contain a block element such as DIV. A cannot contain
      another A. SPAN cannot contain a block element, namely DIV.

      I'm just curious. How did you learn this kind of HTML?

      When you have got something that validates (have you heard of validation?)
      come back.

      --
      Lars Eighner <http://larseighner.com/ <http://myspace.com/larseighner>
      Countdown: 621 days to go.
      =============== ===============
      Terrierism alert level: RAT; expected to be raised to BOSTON soon.

      Comment

      Working...