• Resolved B

    (@logicintl)


    Hi People,

    You know how in WordPress, when you use a bulleted list, sometimes you get your lines, meaning the vertical lines, you get double spacing … when you really wanted the lines to behave just like they do when they are in a paragraph? As in, this is what I am calling single-spacing.

    What is a simple snippet of code to manually put into the Text Editor? No altering the php’s and css’s, just simple html, … I think that’s the right lingo for what I am asking … anyone?

    Thanks,
    B

Viewing 14 replies - 1 through 14 (of 14 total)
  • Can you please provide a url example of this occurring on your site?

    Thread Starter B

    (@logicintl)

    Hey you! ?? … thanks for replying!

    Here is the page that I was/am fiddling with … https://the-rv-life.com/rv-shows-events/

    After non-stop, back and forth, … I finally got zero spacing … by structuring like so:

    <span style=”font-weight: bold;”>NOTICE:?WE ARE NOT RESPONSIBLE FOR ANY ERRORS, OMISSIONS, CANCELLATIONS, OR ACTS OF GOD. PLEASE CONFIRM, CONFIRM, CONFIRM!</span>

    <li style=”margin-top: 0 px; margin-bottom: 0 px”><span style=”font-weight: bold;”>FOR?<span style=”text-decoration: underline;”>RV SHOWS</span>?ONLY –?https://the-rv-life.com/rv-shows-events/category/rv-shows/</span>
    <li style=”margin-top: 0 px; margin-bottom: 0 px”><span style=”font-weight: bold;”>FOR?<span style=”text-decoration: underline;”>RV OPEN HOUSE</span>?ONLY –?https://the-rv-life.com/rv-shows-events/category/rv-open-houses/</span>
    <li style=”margin-top: 0 px; margin-bottom: 0 px”><span style=”font-weight: bold;”>FOR?<span style=”text-decoration: underline;”>RV RALLIES</span>?ONLY –?https://the-rv-life.com/rv-shows-events/category/rv-rallies/</span>
    <li style=”margin-top: 0 px;”><span style=”font-weight: bold;”>FOR YOUR?<span style=”text-decoration: underline;”>CITY OR STATE</span>?USE ‘SEARCH’ BELOW & TYPE IN YOUR CITY AND/OR STATE AND THEN HIT ENTER.</span>
    <li style=”margin-top: 0 px; margin-bottom: 0 px”><span style=”font-weight: bold;”>FOR A?<span style=”text-decoration: underline;”>LIST VIEW</span>?OR A?<span style=”text-decoration: underline;”>MONTH VIEW</span>?CLICK ‘VIEW AS’ BELOW RIGHT.</span>

    Geeeeeeeeeeeeeeeezzz! JOY! We have JOY!

    You can school me if you like, I know I don’t know stuff! ??

    Tanks,
    B

    Thread Starter B

    (@logicintl)

    And, there are < br /> at the end of every line, that the copy/paste just threw out the window, lol, no space to the left of the ‘b’ of course, had to put the space there to get this text to post up.

    Thread Starter B

    (@logicintl)

    You understand I wanted to lose the blank line space between bulleted lines, right?

    Try changing the line-height on the list items

    <li></li>

    to 1em, or just add it inline like this: <li style="margin-top: 0 px; margin-bottom: 0 px; line-height: 1em"></li>

    Thread Starter B

    (@logicintl)

    Ok, I capiche, will make that addition. ??

    And what does the ’em’ stand for? Em, a measurement in ‘typography’.

    Thread Starter B

    (@logicintl)

    @woodson,

    The 1em makes it too tight, but I will fool with it all some more. Thanks for coming to the rescue, and lending moral support and advice, appreciated muchly! ??

    B

    As you say, you can fiddle with it. Using Em instead of Px means that if you later choose to increase the font size of the text, it won’t, essentially, break!

    “1em is equal to the current font size. 2em means 2 times the size of the current font. E.g., if an element is displayed with a font of 12 pt, then ‘2em’ is 24 pt. The ’em’ is a very useful unit in CSS, since it can adapt automatically to the font that the reader uses” (www.w3schools.com)

    Thread Starter B

    (@logicintl)

    ??

    Think you might be suffering the wpautop problem.

    The wpautop() function adds <p> and <br> tags to your content in order to preserve line breaks. If you would rather add these tags yourself, then you can remove the filters which apply this function to the post content in your Child Theme functions.php:

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );

    If you would like to keep the automatic paragraph creation (inserting <p> tags) and just remove the additional <br> tags, you can use this code instead:

    remove_filter( 'the_content', 'wpautop' );
    remove_filter( 'the_excerpt', 'wpautop' );
    
    function wpse_wpautop_nobr( $content ) {
        return wpautop( $content, false );
    }
    
    add_filter( 'the_content', 'wpse_wpautop_nobr' );
    add_filter( 'the_excerpt', 'wpse_wpautop_nobr' );
    Thread Starter B

    (@logicintl)

    @rdell,

    Well now, I dunno, … what I was really after, and still am, was a bulleted list, single-spaced, just as you would get in a paragraph.

    In order to get it, to display as I wanted, in, I suspect a hokey sort of way, I:
    1. Typed in the bulleted list as usual,
    2. Then came back around and removed the < ul >
    tag at the top of the block, and at the bottom of the block, < /ul >
    3. Which left numerous lines with the starting < li > and at the end of those lines, there is the < /li >, where I did a < br >, which WP promptly stripped right out, which is okay, the < /li > was sufficient,
    4. And the but, is, that, when you switch over to the Visual Editor, the < ul > tag at the top jumps back in, and the < /ul > bottom tag jumps back in,
    5. Which is telling me that this is not exactly how WP wants it done, but hey, I don’t want to go into php and css for this,
    6. And this text is appearing inside of a plugin called The Events Calendar > Advanced Template Settings, … “and now you have the rest of the story”.
    7. Dynamite plugin, by the way. ??
    8. So, process that new info, and you tell me, should I really do more, even can I do more, with this situation than I have already done?
    9. And lastly, when you add these snippets of code/language, don’t you label them, what they are, by putting a benign line above what the coding/language represents? I am a neat freak you know, and this carries to, especially how I would operate in these kinds of environments, php files and css activity, lol.

    Thanks for chiming in RDell,
    B

    Thread Starter B

    (@logicintl)

    @rdell, and don’t think your comments above were null, at all, I just learned a little bit about ‘functions’ and how they fit into the whole scenario of the code/language, and how it works to produce what we see on the page. ??

    I have been aware of this particular function you are calling out, but not how or why it did/does this activity, on the page.

    Actually, I just got a better grasp on the meaning and use of ‘functions’ and ‘filters’ … I am going to keep reading and re-reading this snippet from you to absorb all I can from it. Gratitude.

    B

    We’re all on a journey together ??

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Simple Snippet of HTML’ is closed to new replies.