Home › Forums › General Issues › Remove the comma (,) in the line break. › Reply To: Remove the comma (,) in the line break.
Oh, I see. Well, technically it’s not possible to determine when a line break occurs because that depends on the viewport width, and that’s variable, depending on the user’s preference or the display size. But you can work around this with some CSS trickery:
Assuming the tags are output as list like this:
<ul>
<li>Upbeats</li>
<li>Keyboards</li>
<li>Positive</li>
<li>Useful</li>
</ul>
You can use this CSS to make it look as you want:
ul {
margin: 0;
padding: 0;
list-style: none;
overflow: hidden;
}
li {
position: relative;
display: inline-block;
margin-right: .5em;
}
li:before {
content: '';
width: .25em;
height: .25em;
position: absolute;
background-color: blue;
border-radius: 100%;
left: -.5em;
top: 50%;
transform: translateY(-50%);
}
Basically what this does is add the bullet points to the list items as generated content (:before
pseudo-element). By positioning them absolutely, they are taken out of the natural flow of content, so they are out of the boundaries of the list container at the start of each line. And the overflow: hidden
on the list container makes them disappear, for that matter.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz
— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.