jspodisus Posted November 10, 2009 Share Posted November 10, 2009 Hello to everyone Smile How do i display a dynamic navigation menu horizontally? display:block; float:left; works for static menu but how to do it in dynamic menu. I have a custom CMS which uses a php variable $display to show the menu links. echo $menuDisplay CSS .menu a{ display:block; float:left;} but i guess this doesn't work so guys please help me out Quote Link to comment Share on other sites More sharing options...
gevans Posted November 10, 2009 Share Posted November 10, 2009 The way the list is generated is not the issue. Can you show the code that's being 'generated'? Or a link to the page would be better! Quote Link to comment Share on other sites More sharing options...
Dorky Posted November 10, 2009 Share Posted November 10, 2009 display: inline; float: left; Quote Link to comment Share on other sites More sharing options...
gevans Posted November 10, 2009 Share Posted November 10, 2009 display: inline; float: left; displaying as inline is pointless if you're floating left. You'd do one of the other. Floating left and having display as block gives you more flexibility over the sizing of the element, whereas displaying inline will, well, display inline, so floating left is pointless. Quote Link to comment Share on other sites More sharing options...
Dorky Posted November 10, 2009 Share Posted November 10, 2009 we arent here for me. please keep you eye on the ball. if you want to debate post in misc. thx. Quote Link to comment Share on other sites More sharing options...
Dorky Posted November 10, 2009 Share Posted November 10, 2009 http://tjkdesign.com/articles/float-less_css_layouts.asp Quote Link to comment Share on other sites More sharing options...
gevans Posted November 10, 2009 Share Posted November 10, 2009 we arent here for me. please keep you eye on the ball. if you want to debate post in misc. thanks. The original reply wasn't aimed at you. It was telling the OP that you'd given bad advice. Though this one is aimed at you, and for hijacking the thread I apologise. Quote Link to comment Share on other sites More sharing options...
Dorky Posted November 10, 2009 Share Posted November 10, 2009 we arent here for me. please keep you eye on the ball. if you want to debate post in misc. thanks. The original reply wasn't aimed at you. It was telling the OP that you'd given bad advice. Though this one is aimed at you, and for hijacking the thread I apologise. i provided a link to another site that uses the same. im sure they can decide for themselves if it was bad info. and telling them i am giving bad info without a link as i provided to back your statement is a bad call. and yes, you did hijack the thread. Quote Link to comment Share on other sites More sharing options...
gevans Posted November 10, 2009 Share Posted November 10, 2009 i provided a link to another site that uses the same. im sure they can decide for themselves if it was bad info. and telling them i am giving bad info without a link as i provided to back your statement is a bad call. and yes, you did hijack the thread. The example provided via your link does not use display: inline; and float: left on one element. Also, I try not to provide extrenal links when not necessary. I'm not here to teach people how to use google. Quote Link to comment Share on other sites More sharing options...
Dorky Posted November 10, 2009 Share Posted November 10, 2009 For IE Mac, we use display:inline-block;float:left; and we clear the columns using the footer. Yes, I had to break my promise a bit: just to support IE Mac I do use float here. Now we need extra declarations: * vertical-align to make the content of the LIs appear near the header rather than the footer (by default, content appears bottom-aligned). * width to make the LIs sit next to each other rather than take the whole width of their parent container (note that the widths add up: 12em + 29em + 14em = 55em). #s1,#s2,#s3,{display:inline;zoom:1;vertical-align:top;} #s1 {width:12em;} #s2 {width:29em;} #s3 {width:14em;} /*\*//*/ #s1,#s2,#s3 {display:inline-block;float:left;} #ft {clear:left;} /**/ i can see why Quote Link to comment Share on other sites More sharing options...
gevans Posted November 10, 2009 Share Posted November 10, 2009 Just because you read something in a tutrial doesn't mean it's gospel. If you read on you can see that is a hack to correct different browsers. I wouldn't advise someone to use a hack as standard, but add it if necessary. Wouldn't you agree? Quote Link to comment Share on other sites More sharing options...
haku Posted November 11, 2009 Share Posted November 11, 2009 Actually, I give all floated elements with a side margin on the side they are being floated a display of inline to prevent the IE6 double margin bug. It's a valid process, and widths can still be applied. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.