PDA

View Full Version : wrapping with tags


eraserhead
05-21-2007, 09:39 PM
Hi there

This seems like a simple question, but I've searched everywhere without any luck!

I'm using different tags on the following code, but want everything on the same line without any line breaks...

Any suggestions?

<h2>
<a href="index.php?x=about" title="">about</a>
<h3>
<a href="index.phpshowimage=<IMAGE_ID>"></a><COMMENT_POPUP>
</h2>
</h3>

Many thanks!

Eraserhead

austriaka
05-22-2007, 06:31 AM
headline tags in HTML (<h2>, <h3>) are making a paragraph. Additionally you should respect the order of opening tags when closing them.
Why don't you use
<h2>
<a href="index.php?x=about" title="">about</a>
&nbsp;
<a href="index.phpshowimage=<IMAGE_ID>"></a><COMMENT_POPUP>
</h2>

KArin

eraserhead
05-22-2007, 10:46 AM
I was trying to use different colors etc.. (one for each tag) for the different links, but keep them on the same line.

Is there a way of stopping <h3> in my example from starting a paragraph?

Thanks again!

Eraserhead

austriaka
05-22-2007, 03:04 PM
Easiest way would be to use CSS classes and <span> for that (span doesn't make a paragraph):

<H2>
<span class="blue">
<a href="index.php?x=about" title="">about</a>
</span>
&nbsp;
<span class="red">
<a href="index.phpshowimage=<IMAGE_ID>"></a>
</span>
&nbsp;
<span class="green">
<COMMENT_POPUP>
</span>
</h2>

and define
.red
.blue
.green
in CSS

KArin