- This topic is empty.
-
AuthorPosts
-
November 27, 2018 at 1:44 pm #279578miha1234Participant
Hello
I would like to disply my menu with ul/li. The thing is that li is generated and I can not break in new line words when there is issue with width.
Here is the trouble that i am seeing: https://www.dropbox.com/s/4f1cnf4g8spml84/slika.JPG?dl=0
my code:
{% if linklists[section.settings.footer_linklist].links.size > 0 %} {% endif %}@media screen and (min-width: 480px) { /* please note that 480px is arbitrary. You decide on the breaking point. */ .site-footer__linklist-item { display: inline-block; width: auto /* flex-basis: auto; // you can use "auto" or "initial" */ } } .site-footer__linklist-item { display: block; width: 100%; /* flex-basis: 100%; // this is alternative */ } .footer-costume{ @media screen and (min-width: 200px) and (max-width:900px) { text-align: center; } @media screen and (min-width: 901px) and (max-width:2200px) { text-align: center; // display:none !important; } } .footer-costume_ul{ margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; list-style: none; } .footer_a { margin-left: 1rem; } .footer_pipe + .footer_pipe::before { padding-rigt:10px; content: "|"; }
thank you!
mihaNovember 27, 2018 at 10:43 pm #279606BeverleyhParticipantTry mocking up the issue in a live CodePen demo – code is easier for us to troubleshoot there. Note that we only need the minimal amount of CSS and HTML to illustrate the problem. We don’t need your whole codebase.
November 28, 2018 at 2:12 am #279615miha1234ParticipantHello
the link is here: https://codepen.io/miha-/pen/jQeExB
How in this case postion “pipe” that it will look nice :)
thank you.
November 28, 2018 at 3:28 am #279617BeverleyhParticipantHmmm, the demo doesn’t look anything like the image, and the “pipe” displays fine there. Unfortunately, we can’t troubleshoot code that doesn’t illustrate the problem. Please provide the CSS that is causing the undesirable menu/list behaviour as shown in your image. You might need to inspect each element in the Developer Toolbar (F12) and take applied styles from there.
November 28, 2018 at 1:09 pm #279634miha1234ParticipantHello
https://codepen.io/miha-/pen/yQRRNp
hope this is better. Only difference in my case is that i have on my dev site:
.footer_pipe + .footer_pipe::before {
content: “|”;
}but in here i posted only
.footer_pipe::before {
content: “|”;
}is the upper css this not work. My main issue is how to align this that it will look nice and the words will be position centered (that are in two lines).
thank you!
November 28, 2018 at 1:10 pm #279635miha1234ParticipantAlso forgot to write that when the page is resized that “|” is always in the middle.
thank you!November 28, 2018 at 2:06 pm #279637BeverleyhParticipantWhat about;
.site-footer__linklist-item{ display: flex; align-items:center; }
November 29, 2018 at 12:35 am #279646miha1234Participant@Beverleyh thank you so much for that. just one thing, now when you resize page “|” is not always in the middle, how to achive that?
br
mihaNovember 29, 2018 at 1:35 am #279647BeverleyhParticipantI don’t understand what you mean – the “|” is always in the vertical middle.
Have you forgotten to include any media queries that somehow change the display at narrower screen widths?
Or do you mean that, horizontally, the “|” sits flush against the text at one side? That’s down to only having margin on the left side of your links.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.