Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Insert a space after text, but before closing li.
I have this in my rightbar: <code><txp:linklist form=“Links” category=“Daily-Reads” sort=“linksort” wraptag=“ul” break=“li” /></code>
Which outputs a simple list. What I want to do is add a space after each item, but before the closing li tag. Example:
<code><li><a href=”“>A Link To Something</a> </li></code>
The reason I want to do this is if I don’t, IE will add a bunch of space after each LI because I have their A elements display set to block in CSS. It’s a weird stupid bug, but the fix works great.
Anyone know how to do this?
Jordan Wollman [url=http://www.fringeimage.com/]// Fringe Image[/url][/color]
Offline
#2 2005-10-30 18:49:42
- Niconemo
- Member
- From: Rhône-Alpes, France
- Registered: 2005-04-18
- Posts: 557
Re: Insert a space after text, but before closing li.
Why don’t you do this with CSS ? There’s no space character needed here. When styling is the problem, Style sheet is the solution ;-)
<code>
.my_div_with_the_link_list li
{
padding-right:1em;
}
<code>
Last edited by Niconemo (2005-10-30 18:51:27)
Nico
Offline
Re: Insert a space after text, but before closing li.
I think you’re misunderstanding me. I don’t need to add padding/margin to the actual text.
The hack requires the extra space in the tag, not in the rendering.
In IE, this code: <code><li><a href=”“>A Link To Something</a></li></code> adds space after each list item when the anchor element has <code>display: block;</code> set.
This code: <code><li><a href=”“>A Link To Something</a> </li></code> for some odd reason (only IE developers and God know) kills the extra space below the list items.
Thanks for the reply though.
Jordan Wollman [url=http://www.fringeimage.com/]// Fringe Image[/url][/color]
Offline