css - jquery menu error displays block rather than inline on click -
i've created dropdown menu using jquery, displays inline how want display , once clicked display other options. once click on link appears put li tag blocks.
anyone have ideas why doing this??
html
<!-- navigation bar start --> <div id="navbar"> <!-- england nav bar start --> <li id="engmainnav"><a href="#">england</a> <ul id="engsubnav"> <li class="engli"><? echo $this->html->link('news', array('controller'=>'premiership', 'action' =>'news')); ?></li> <li class="engli"><? echo $this->html->link('results/fixtures', array('controller'=>'premiership', 'action' =>'resultsfixtures')); ?></li> <li class="engli"><? echo $this->html->link('teams', array('controller'=>'premiership', 'action' =>'teams')); ?></li> <li class="engli"><? echo $this->html->link('table', array('controller'=>'premiership', 'action' =>'table'));?></li> </ul> </li> <!-- england nav bar end --> <!-- la liga nav bar start--> <li id="sanav"><a href="#">italy</a> <ul id="sasubnav"> <li class="sali"><? echo $this->html->link('news', array('controller'=>'italy', 'action' =>'news')); ?></li><br/> <li class="sali"><? echo $this->html->link('results/fixtures', array('italy'=>'premiership', 'action' =>'resultsfixtures')); ?></li><br/> <li class="sali"><? echo $this->html->link('teams', array('controller'=>'italy', 'action' =>'teams')); ?></li><br/> <li class="sali"><? echo $this->html->link('table', array('controller'=>'seriea', 'action' =>'table'));?></li><br/> </ul> </li> </div> <!-- navigation bar end --> css
/* navigation style */ #navbar { background-color: #000666; margin: 0px 0px 0px 10px; } #engsubnav { list-style: none; margin:none; display: none; } #sasubnav{ list-style: none; margin:none; display: none; } .engli { margin: 0px 0px 0px -38px; display:block; } li { list-style: none; margin: 0px 0px 0px 10px; display:inline; } ul{ display:inline; } thanks in advance
you've got display:block; in .engli statement (the li elements in england list have class of 'engli'). ul might set inline, lis block, once they're shown on click, drop new lines.
Comments
Post a Comment