Sub heading for code help

Discussion in 'HTML & Website Design' started by innofidelity, Mar 30, 2014.

  1. #1
    I want to place sub headings for this main menus , i ahve tried but unable to do that..anyone can help for that plz

     <header id="topMenuHeader">
         <div id="topMenuHeaderInner" class="wrapper">
         <ul class="menu">
         <li class="first"><a href="signature-pools.php" title="Signature Pools">Signature Pools</a></li>
       
      <li><a href="vandrro.php" title="Vandrro">Vandrro</a></li>   
      <li><a href="dynamic-architectural-fittings.php" title="Dynamic Architectural Fittings">Dynamic Architectural Fittings</a></li>
      <li><a href="toughstore.php" title="Toughstore">Toughstore</a></li>
               
      <li><a href="captrad.php" title="Captrad">Captrad</a></li>
      <li><a href="general-grp-mouldings.php" title="General GRP Moldings">General GRP Moldings</a></li>
      <li><a href="s-plas.php" title="S-Plas">S - Plas</a></li>
      <li class="last"><a href="composite-timber.php" title="Composite Timber">Composite Timber</a></li>
      </ul>
      </div>
      </header>
    Code (markup):

     
    innofidelity, Mar 30, 2014 IP
  2. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #2
    Here's a simple demo:
    
    <!DOCTYPE HTML>
    
    <html>
    <head>
      <meta content="text/html; charset=utf-8"
      http-equiv="Content-Type">
    
      <title>Test Doc</title>
      <style type="text/css">
    /*<![CDATA[*/
    
      body {
      font: normal 100%/1.25 sans-serif;
      margin: 0;
      padding: 1.25em;
      }
    
      p {
      font-size: 1em;
      }
    
      /*]]>*/
      </style>
    </head>
    
    <body>
      <h1>Menu with sub-heads demo</h1>
      <hr>
    
      <h2>Main Menu</h2>
    
      <ul>
        <li>
          <h3>Sub menu</h3>
    
          <ul>
            <li>item</li>
    
            <li>item</li>
    
            <li>item</li>
          </ul>
        </li>
    
        <li>
          <h3>Sub menu</h3>
    
          <ul>
            <li>item</li>
    
            <li>item</li>
    
            <li>item</li>
          </ul>
        </li>
      </ul>
    </body>
    </html>
    Code (markup):
    cheers,

    gary
     
    kk5st, Mar 30, 2014 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Numbered headings in a menu don't make any semantic sense; generally if a section is worthy of having headings, it shouldn't be in a bullet point (as in the literary/grammatical sense) list.

    Though honestly, I don' think that's what the OP is asking, though I'm having a dog of a time figuring out what the blazes is even being asked. Of course the HEADER and DIV for nothing mated to the pointless code bloat TITLE attributes that serve no legitimate purpose sure isn't helping things. Big tip, unless you are worrying about accesskeys menus (which with pathetically crippled Opera 15+ throwing those in the trash) if the contents of your TITLE attributes is identical to the content of the tag itself, you shouldn't be putting TITLE on them! That's just stupid and serves no legitimate purpose.

    What elements are subsections in that menu for there to even BE headings? I think I'm flat out not getting what you're asking -- and if Gary's code is what you are asking about, you're doing something wrong!
     
    deathshadow, Mar 30, 2014 IP
  4. innofidelity

    innofidelity Active Member

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #4
    i wanna add sub menu under this menu item
    <li><a href="vandrro.php" title="Vandrro">Vandrro</a></li>
    Code (markup):
    then i used code
    <li><a href="vandrro.php" title="Vandrro">Vandrro</a>
    <ul>
    <li><a href="#">Drop1</a></li>
    <li><a href="#">Drop2</a></li>
    <li><a href="#">Drop3</a></li>
    </ul></li>
    Code (markup):
    But it not working , sub menu is not coming under "Vandrro" plz help
     
    innofidelity, Mar 30, 2014 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Well, that is properly formed for it to be a submenu (though I'd lose that "title for nothing") -- what are you using for CSS to place it, and what's the existing menu CSS? Most existing menus don't have style for positioning of sub-menus already in them -- depending on what's already in there it could be as simple as just adding style for the submenu, or it could be throwing it away and starting over from scratch for the existing style being incompatible. You might have some pointless crap like bootstrap or blueprint that has to be coded around (or I'd suggest pitching the entire project and starting over at that point) or worse, scripttardery like jQuery making it inaccessible enough that adding submenus is the least of your worries.

    Though taking a wild guess, I assume you mean the "signature pools" website? If so, I would suggest swinging an axe at the HTML 5 bloat (and associated javascript polyfill crap), swinging an even bigger axe at the "HEADER and DIV for nothing" garbage, fixing the heading orders, the table for nothing/span for nothing, the gibberish use of numbered headings, get an actual MEDIA target on the style LINK, and of course get the layout into actual dynamic fonts to make it elastic, and probably semi-fluid while at it... and the overstuffed/redundant to itself/not relevant to the content "keywords" META probably isn't helping much either.

    ... and with that many menus and menu items, I sure as shine-ola wouldn't be adding dropdowns to that top menu -- runs the risk of becoming 'link overload' -- so many links users can't actually find anything.

    Though you want to see it done... That is the site in question, right? If so I can try and come up with compatible CSS, but like I keep telling people I'd be throwing that entire site away as being 'not viable for web deployment'... though I'd really drag it kicking and screaming into modern coding practices and toss at least a third of the code on the floor... and it's filled with elements I'd not have on a layout in the first place.
     
    deathshadow, Mar 30, 2014 IP
  6. innofidelity

    innofidelity Active Member

    Messages:
    229
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #6
    @deathshadow
    I have added here php file for top menu , can you help me with that file or do you need more files to fix that issue, Appreciate your advice.
    Also you means do i need to edit CSS too to make sub menus?
     

    Attached Files:

    innofidelity, Mar 31, 2014 IP