Welcome to WebmasterWorld Guest from 50.19.0.90

Forum Moderators: incrediBILL

Message Too Old, No Replies

question about ouputting links and <li>

     
3:52 pm on Jul 13, 2009 (gmt 0)

New User

5+ Year Member

joined:June 28, 2008
posts:17
votes: 0


I'm sure there is a simple answer to this or I hope so. I don't have much computer code experience so I'm just going with trial and error. Anyway, my question is concerning the output of my navigation links.
Its setup like this in template
<ul>
<li>[Navigation]</li>
</ul>

this outputs a set of about 10 links that look like this in the code

ul>
<li>
link
<br/>
link
<br/>
link
<br/>
</li>
</ul>

It works but I need the code to look like this for it to function right.

ul>
<li>
link
</li>
<li>
link
</li>
<li>
link
</li>
</ul>

how do i code that using the [Navigation] Variable

thanks a ton

1:29 pm on July 16, 2009 (gmt 0)

New User

5+ Year Member

joined:June 28, 2008
posts:17
votes: 0


Bump.....anyone, the problem Im having is it outputs my links like this
--------
link1
link2
link3
--------
when it should be like this
--------
link1
--------
link2
--------
link3
--------

please help
thanks

1:33 pm on July 16, 2009 (gmt 0)

Preferred Member

10+ Year Member

joined:Dec 9, 2003
posts:503
votes: 0


You need to use CSS to give the LI's some padding or margin.

You could try creating a style sheet and adding:

li {margin-bottom:0.5em;}

Which would force down the LI below it

or

li {padding: 0.5em 0;}

Which would give equal padding top and bottom.

10:24 pm on July 20, 2009 (gmt 0)

New User

5+ Year Member

joined:June 28, 2008
posts:17
votes: 0


thanks simonuk but its treating the Navigation variable as one li with just <br/> inbetween.
any css i do just applys it to the top and bottom of the links but as if they are one unit. How do I get the navigation variable to ouput the links so that each link has <li></li>

Hope I am explaining this right

thanks

2:10 am on July 21, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


It sounds like the issue is this - what does the [Navigation] variable cause your server to output. It seems like you want it to step through a list of links, one by one, that are stored somewhere. Instead, it just dumps the entire list, because that's what your code is telling it right now. That is, there's no instruction that steps through a list one record at a time.

I'm not sure what kind of dynamic technology you are using. As a simplistic approach, can you store that list of links with the <li></li> markup included in the list, rather than having the <li></li> included in the static html?

At any rate, the challenge you face is not in the html itself, but in the interaction with whatever dynamic technology you are using.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members