Jump to content

Css for Dynamic Navigation menu ;


jspodisus

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.