469,963 Members | 1,615 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,963 developers. It's quick & easy.

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><div>
New Tab <span id="moduleCount18" class="moduleCount">(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_modules.php?tab_id=1">
General <span id="moduleCount1" class="moduleCount">(7)</span>
</a></li>
<li id="tab6"><a href="draw_modules.php?tab_id=6">
Learning Management <span id="moduleCount6" class="moduleCount">(2)</
span>
</a></li>
<li id="tab18"><a class="" href="#remote-tab-3"><span><div>
New Tab <span id="moduleCount18" class="moduleCount">(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

May 9 '07 #1
2 8568
la***********@zipmail.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><div>
New Tab <span id="moduleCount18" class="moduleCount">(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.
http://validator.w3.org/
http://jigsaw.w3.org/css-validator/

--
Berg
May 9 '07 #2
In our last episode,
<11********************@e51g2000hsg.googlegroups.c om>,
the lovely and talented la***********@zipmail.com
broadcast on comp.infosystems.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><div>
New Tab <span id="moduleCount18" class="moduleCount">(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.
May 9 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Nova's Taylor | last post: by
4 posts views Thread by Brian Basquille | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.