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.

self-adjusting menu with two rows

Featured Replies

Hello :)

I really might need some help...

 

So I've got main box - with limited width.

 

User with CMS can add as many buttons as he likes... And these buttons are created from three parts- so they can adjust to content.

 

While there is no more space for buttons: last button should become "two-storey" - with two lines of text...

 

Has anybody got an idea how I can achieve that? :huh:

Any help really appreciated! :pp

 

(I'm front-end guy not cms-maker;p)

 

post-20438-095614100 1282322030_thumb.jpg

Not 100% sure what you mean but what cms are you using and are you using a theme

  • Author

I'm not sure I've chosen correct forum's section;p

 

I'm html coder - but still - my code will be used by cms-makers ;)

 

Anyway: there's no theme, cms is from scratch I guess.

I think CSS float: will help you.

  • Author

what do you mean?

I don't think float alone will help :blush1:

 

I was thinking maybe conditions.. if number of tabs is something and their width is something then words start to locate above themselves;p

 

hmm or tables?

  • Author

I don't want containers to flow;p but text inside them to be in two lines;p

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<style type="text/css">
#floats {}
#floats ul {margin: 0; padding: 0;}
#floats ul li {list-style-type: none; float: left; display: inline;}
#floats ul li a {color: #fff; display: block; background: #900; margin: 5px 2px; padding: 5px 10px;}
</style>	
</head>
<body>

<div id="floats">
<ul>
	<li><a href="#">Link 1</a></li>
	<li><a href="#">Link 2</a></li>
	<li><a href="#">Link 3</a></li>
	<li><a href="#">Link 4</a></li>
	<li><a href="#">Link 5</a></li>
	<li><a href="#">Link 6</a></li>
	<li><a href="#">Link 7</a></li>
	<li><a href="#">Link 8</a></li>
	<li><a href="#">Link 9</a></li>
	<li><a href="#">Link 1</a></li>
	<li><a href="#">Link 2</a></li>
	<li><a href="#">Link 3</a></li>
	<li><a href="#">Link 4</a></li>
	<li><a href="#">Link 5</a></li>
	<li><a href="#">Link 6</a></li>
	<li><a href="#">Link 7</a></li>
	<li><a href="#">Link 8</a></li>
	<li><a href="#">Link 9</a></li>
</ul>
</div>
</body>
</html>

Anyway all menu items must be of the same height.

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.