homepage Welcome to WebmasterWorld Guest from 54.234.2.94
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
question about ouputting links and <li>
gearupandplay




msg:3951602
 3:52 pm on Jul 13, 2009 (gmt 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

 

gearupandplay




msg:3953680
 1:29 pm on Jul 16, 2009 (gmt 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

simonuk




msg:3953685
 1:33 pm on Jul 16, 2009 (gmt 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.

gearupandplay




msg:3956150
 10:24 pm on Jul 20, 2009 (gmt 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

tedster




msg:3956201
 2:10 am on Jul 21, 2009 (gmt 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved