[Resolved] Bullets For Two Lines Of Text

Home Forums Support [Resolved] Bullets For Two Lines Of Text

Home Forums Support Bullets For Two Lines Of Text

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #602136
    Mary Pearson

    I am using an image to replace my bullets. When the text overflows onto two lines, the bullet lines up between the two lines of text instead of at the top of the first line. What am I missing? Thank you.

    The CSS I’m using is:

    /* Remove bullet points and “standarize” list */
    .my-list {
    list-style: none !important;
    display: inline;
    width: auto;
    overflow: hidden; }

    /* Add images instead of bullet points */
    .my-list li {
    background: url(‘https://my-website/wp-content/uploads/2018/06/bestwebsites-bullet-15px.png’) center left no-repeat;
    padding-left: 25px !important;
    margin-left: 25px;
    line-height: 200%;
    list-style-position: outside; }

    #602351
    Tom
    Lead Developer
    Lead Developer
    #602790
    Mary Pearson

    Thanks Tom,

    Lots of things on that page to try. Good resources. I finally settled on:

    /* Remove bullet points and “standarize” list */
    .my-list {
    list-style-type: none;
    display: inline;
    width: auto;
    overflow: hidden; }

    /* add images instead of bullet points */
    .my-list li {
    background: url(‘https://…..bullet-15px.png’) left top no-repeat;
    padding-left: 25px;
    margin-top: 10px;
    margin-left: 25px;
    line-height: 1.5em;}

    li:first-child {
    margin-top:0; }

    #602912
    Tom
    Lead Developer
    Lead Developer

    Glad you got something working 🙂

    #603022
    Mary Pearson

    It’s not perfect, and it’s hard for a perfectionist to let it go at “not perfect”, but it will do. 😉

    #616710
    Mary Pearson

    I kept at it. This is the best code, at least for my situation.

    /* Remove bullet points and “standarize” list */
    .my-list {
    	list-style-type: none;
    	display: inline;
    	width: auto;
    	overflow: hidden; 
    }
    
    /* add images instead of bullet points */
    .my-list li {
    	background: url('/CG-bullet.png')  no-repeat 0 2px;
            padding-left: 30px;
            margin-left: 25px;
            margin-bottom: 15px;  
    }
    #616845
    Tom
    Lead Developer
    Lead Developer

    Awesome, thanks for sharing it! 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.