Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Jun 2007
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile My Sitemap and its upsetting layout

    Ok so i wanted to create a simple sitemap.

    Was going well and this is it so far :

    Code:
    <ol style="list-style-type='upper-roman'" start="1">
    <a href="'"><li>Homepage</li></a>
    <a href="'"><li>Services</li></a>
             <ul>
    <pre>                       <a href="'"><li>Supply and Install</li></a></pre>
    <pre>         <a href="'"><li>Consultancy</li></a></pre>
    <pre>           <a href="'"><li>Training</li></a>       </pre> 
              </ul>
    
    
    <a href="'"><li>Products</li></a>
                        <ul>
    <tab>          <a href="'"><li>Commercial</li></a>
           <ul>
                                            
     <pre>.        </pre>             <a href="'"><li>Pyrtec</li></a>
     <pre>        </pre>             <a href="'"><li>Pyrot</li></a>
    <pre>        </pre>              <a href="'"><li>Dyn</li></a>
     <pre>        </pre>             <a href=""><li>Eco</li></a>
    <pre>        </pre>              <a href="'"><li>Kunzel</li></a>
                                                          <ul> 
                           <pre>        </pre> <pre>        </pre>             <a href=""><li>Log</li></a>
         <pre>        </pre> <pre>        </pre>              <a href=""><li>Pellet</li></a>
                                                          </ul>
                                         </ul>
              
    <tab>         <a href="'"><li>Domestic</li></a>
                      
    <ul>
         <pre>        </pre>         <a href=""><li>Your needs</li></a>
        <pre>        </pre>         <a href="'"><li>Kunzel</li></a>
                                                          <ul> 
                 <pre>        </pre> <pre>        </pre>              <a href=""><li>Log</li></a>
              <pre>        </pre> <pre>        </pre>            <a href=""><li>Pellet</li></a>
                                                          </ul>
                                         </ul>
              </ul>
    
    <a href="'"><li>Case Studies</li></a>
    
    <a href="'"><li>Links</li></a>
    
    <a href="'"><li>Downloads</li></a>
    
    <a href="'"><li>Contact Us</li></a>
    However what is nasty about it is, no indentation on the sub levels of menu! Such as:

    Homepage
    Services
    product 1
    product 2
    Products
    prod 1
    sub prod 1

    .........you get the picture!(or maybe not because this as well removes my formatting )

    I have tried <tab> as I thought it was a command - it isnt i dont think, or at least it dosnt work. I also tried ising <pre> but this doesnt work well either!

    Can anybody suggest anything?!

    Thanks

    Andy Andy
    Last edited by AndyArmstrong; 06-27-2007 at 04:39 PM.

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    What are you using to create the sitemap? It looks like you're using a program that's inserting all sorts of stuff you don't need.

    Mark it up with unordered lists. Style it with CSS. That is all.

  • #3
    Regular Coder
    Join Date
    Jun 2007
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I coded it from the start to finish!?

    CSS wont do as I need, because I want a stepped layout - with css u couldnt add to one level , or you would need like 8 classes, one for each level...

  • #4
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    I find it hard to understand what it is you exactly want, but you can do a lot with CSS.

    For example, make a class called indent or whatever and apply that to the list items that you want indented.

    Code:
    CSS
    li.indent {
    text-indent: 40px;
    }
    
    HTML
    <li class="indent">Text</li>
    
    (of course within an ol or ul)

  • #5
    Regular Coder
    Join Date
    Jun 2007
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts
    but if i have:

    home

    product
    .,....product 1
    ............sub product 2
    ......product 3

    services
    etc etc etc, i will need a new class for each level of indent.

  • #6
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Quote Originally Posted by AndyArmstrong View Post
    i will need a new class for each level of indent.
    Yes.

  • #7
    Regular Coder
    Join Date
    Jun 2007
    Posts
    145
    Thanks
    0
    Thanked 0 Times in 0 Posts
    lol right...

  • #8
    Senior Coder koyama's Avatar
    Join Date
    Dec 2006
    Location
    Copenhagen, Denmark
    Posts
    1,246
    Thanks
    1
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by AndyArmstrong View Post
    but if i have:

    home

    product
    .,....product 1
    ............sub product 2
    ......product 3

    services
    etc etc etc, i will need a new class for each level of indent.
    Alternatively, you could use nested lists. Then all you would need would be something like this
    Code:
    ol {
      margin-left: 0;
      padding-left: 40px;
    }
    Code:
    <ol>
    	<li>[...]</li>
    	<li>[...]
    		<ol>
    			<li>[...]</li>
    			<li>[...]</li>
    		</ol>
    	</li>
    	<li>[...]</li>
    	<li>[...]</li>
    </ol>
    It would also degrade nicely when styles are disabled.

  • #9
    New Coder
    Join Date
    Mar 2005
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could try adding a series of &nbsp; before each indent?

  • #10
    Regular Coder Jutlander's Avatar
    Join Date
    Jun 2007
    Location
    In my own sick little world :P
    Posts
    425
    Thanks
    1
    Thanked 12 Times in 12 Posts
    That wouldn't be semantic at all and it is generally more trouble to it, harder to maintain.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •