[SOLVED] CSS menu not rendering properly when wrapping
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a menu which renders the way it is supposed to as long as it does not need to wrap. See the two images below. The first one is correct. The second one is how it looks when it is looking wrong.
Is there a way that will get the nice effect as shown in the first picture even when wrapping? Or another way to get a similar visual effect would be fine, too, as long as it is 100% CSS.
This is a problem in portrait mode on narrow screens such as certain mobile devices.
Below is the CSS along with the corresponding XHTML.
Your breadcrumb thingy consists of items that are equal members of the same list, but IMHO a breadcrumb thingy indicates nested items, i.e. BBBB is _inside_ AAAA, etc.:
Be that as it may, one way to break the gordic knot is to change to a different layout altogether when the width goes under a certain value. You know, media queries, responsiveness...
I guess I'd choose a more vertically oriented display.
Most implementations these days would use Flexbox.
Yes, that make sense. I guess my question then narrows to be about how to acheive the pointed triangles at the right of each item. My demo is using borders but that is where the trouble occurs when the wrapping happens.
This link doesn't give the tail portion but it gives triangles (and a remarkable array of shapes). There might be enough in it to help https://css-tricks.com/the-shapes-of-css/https://css-tricks.com/the-shapes-of-css/
Thanks. That is a little more portable than clip-path, in regards to older browsers though much more difficult to work out. clip-path is basically just a list of points which demarcate a polygon for the canvas:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.