Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Centering logo inside dynamic menu

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #45507
    Anonymous
    Inactive

    Well, I am trying to create a responsive layout and I need to center the logo inside a horizontal menu. I already found a solution for this here on css-tricks forum, but it doesn’t solve my “dynamic” issue. The menu will be for a cms where I can’t control the number of links inside it. I tried to add left margin to the nth-child(4) but when the user adds more than 8 links in total it goes crazy. I added below a pen with the html structure and some css, I left the js blank for you to have some fun. I was thinking of splitting the menu in 2 ul-s and move the html structure for the logo in between, but I don’t like the idea. I hope you guys will come up with something.

    [Codepen Link](http://codepen.io/vcatalin/pen/vxBnK “Codepen Link”)

    Thanks! And sorry for my english.

    #138601
    wolfcry911
    Participant

    what do you want to happen when there is an odd number of links?

    #138602
    Anonymous
    Inactive

    That’s another problem. Lets say there are 7, the first four should be on the left and the rest on the right.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘Other’ is closed to new topics and replies.