Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Submenu li spacing

Featured Replies

Good evening,

 

I was wondering if someone could help me. I am trying to get my submenu li spacing to be even but I cannot see what is causing the problem. Can anyone see what I am missing.

 

Website address is here. Thanks in advance :-)

Whatever script you are using for you menu is adding a tonne of inline styles, this doesn't seem to be a very good way of doing things. I'd drop the script and use CSS for layout as the menu is not so complex you need javascript for any layout.

 

For the submenu I recommend you make use of display-table and display-table-cell you can use that to make each item have equal spacing. Something like this..

<ul class="submenu">
  <li>item</li>
  <li>item</li>
...
</ul>

.submenu {
  display: table;
  table-layout: fixed;
  width: 100%;
  text-align: center;
}

.submenu li {
  display: table-cell;
  width: 100%;
  line-height: 30px; /* height you want the item */
  vertical-align: middle;
}

Edited by rbrtsmith

Not on the same topic but is likely to pose a problem

 

Here is a shot of the home page in 360px x 640px from the Developer tools in FF.

 

post-33158-0-67095800-1426964616_thumb.jpg

 

Note the text objects overlapping each other.

  • Author

Hey thanks for your comments so far...

 

Yes the website is still being developed and I am aware of the responsive issues, thanks for taking the time to comment though.

 

The website is being built using a theme chosen by the client so I am having to make do with what I have at the moment.

You're gonna struggle to fix those issues then, this is one of many problems when taking a theme and trying to hack away at it. It's best to build from scratch to match the specification, or if the client has a really tight budget then just put in the theme and don't touch the code.

 

Hacking away at pre-built themes rarely, if ever ends well unfortunately. For now work with what you have and make the best of the situation.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.