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.

Left/Right Borders (Drop Down Menu)

Featured Replies

How do I make the side borders 1 unit size instead of having the left/right borders combined in a drop down menu etc?

 

It's just the hover part I can't figure out.. I couldn't combine Last-Child with Hover.. and Last-Of-Type I think was the same..

 

https://www.trevorsiu.com/frame.html

 

 

Also not that I'm sure I wanna.. but.. how do I make the cells the size of the word instead of all the same width?

  • 2 weeks later...

How do I make the side borders 1 unit size instead of having the left/right borders combined in a drop down menu etc?

 

It's just the hover part I can't figure out.. I couldn't combine Last-Child with Hover.. and Last-Of-Type I think was the same..

 

https://www.trevorsiu.com/frame.html

 

 

Also not that I'm sure I wanna.. but.. how do I make the cells the size of the word instead of all the same width?

 

Can you explain in clearer detail for the first issue?

 

 

 

Remove width from the li and add padding: 0 20px; to the label.

  • Author

If the border size is 1px each left and right is touching and becoming 2px apart from obviously the outer ones..

 

How do I.. you know.. give all the right borders 0px except for the last one..

If the border size is 1px each left and right is touching and becoming 2px apart from obviously the outer ones..

 

How do I.. you know.. give all the right borders 0px except for the last one..

 

set border-right to them all and then .element:last-child{border-right:0;}

The problem is the positioning. It's expanding the container (parent <li>).

 

Change #menu ul ul to this:

#menu ul ul {
    display: none;
    position: absolute;
    width: 100%;
    left: 0px;
}

and add this:

ul li {
 position:relative;
}

Then take a look at the results.

Edited by EddieT

Also not that I'm sure I wanna.. but.. how do I make the cells the size of the word instead of all the same width?

 

I agree, not sure why you would want to do that, but in your css you have:

#menu>ul>li {
    float: left;
    width: 90px;
}

Remove the width: 90px and the list items will collapse in size. If you do this, maybe add padding: 0 10px; to #menu label - this makes it look better.

  • Author

The top right isn't noticeable in 1px after I added all that.. and I was gonna ask the last thing.. what's the logic in lining up the sides..

 

I figure if I change it to reverse.. It'll just be the same but sideways reverse..

I'm sorry buddy but I'm not sure I understand the question.

 

Maybe try remaking in in a Fiddle so I can have a play with it?

I'm sorry buddy but I'm not sure I understand the question.

 

Maybe try remaking in in a Fiddle so I can have a play with it?

 

Im with Eddie... that makes no sense.

  • Author

I added the code and it fixed it.. well almost.. if I increase the border size to 3px.. you can see the bit on the end..

 

But with the regular 1px border it looked ok..

 

 

https://www.trevorsiu.com/frametest.html

 

 

After that how do I line up the lines on the boxes?

 

 

I'm always using the left borders for the right.. but the drop down boxes is out of line.

  • 2 weeks later...

I added the code and it fixed it.. well almost.. if I increase the border size to 3px.. you can see the bit on the end..

 

But with the regular 1px border it looked ok..

 

 

https://www.trevorsiu.com/frametest.html

 

 

After that how do I line up the lines on the boxes?

 

 

I'm always using the left borders for the right.. but the drop down boxes is out of line.

 

 

You have wrote you're html wrong.

 

<li>
<label>Music</label>
<ul>
</li>
</ul>
</li>
Should be:
<li>
<a href='#'>Music</a>
<ul>
<li><a href='#'>Sub nav</a></li>
</ul>
</li>

Edited by Matthew Claffey

  • Author

Where do all the links go in the new code like /email and all that..

  • Author

In the href part obviously? I thought you meant link to # literally..

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.