Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1321102

    Hi, I should layout a section of text as shown in the attached photo … what can I do?

    #1321387

    Hey katodicadesign,
    Thank you for your patience and the mockup, one way to do this would be with a table element set to display tabular data, but it does have it’s limitations, I would use a html template with css rules for better control and styling options, for example I found this template and adjusted the css a little for this effect:
    2021-09-17_001.png
    by placing this code in a code block element:

    <style>
    .timeline {
        border-bottom-right-radius: 4px;
        border-top-right-radius: 4px;
        margin: 0 auto;
        letter-spacing: 0.2px;
        position: relative;
        line-height: 1.4em;
        font-size: 1.03em;
        padding: 5px;
        list-style: none;
        text-align: left;
        max-width: 60%;
    }
    li.event {
    	list-style: none;
    }
    @media (max-width: 767px) {
        .timeline {
            max-width: 98%;
            padding: 25px;
        }
    }
    
    .timeline h1 {
        font-weight: 300;
        font-size: 1.4em;
    }
    
    .timeline h2,
    .timeline h3 {
        font-weight: 600;
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .timeline .event {
        border-bottom: 1px dashed #000;
        padding-bottom: 25px;
        margin-bottom: 25px;
        position: relative;
    }
    
    @media (max-width: 767px) {
        .timeline .event {
            padding-top: 30px;
        }
    }
    
    .timeline .event:last-of-type {
        padding-bottom: 0;
        margin-bottom: 0;
        border: none;
    }
    
    .timeline .event:before,
    .timeline .event:after {
        position: absolute;
        display: block;
        top: 0;
    }
    
    .timeline .event:before {
        left: -207px;
        content: attr(data-date);
        text-align: right;
        font-weight: 100;
        font-size: 0.9em;
        min-width: 120px;
    }
    
    @media (max-width: 767px) {
        .timeline .event:before {
            left: 0px;
            text-align: left;
        }
    }
    
    
    @media (max-width: 767px) {
        .timeline .event:after {
            left: -31.8px;
        }
    }
    
    .rtl .timeline {
        border-left: 0;
        text-align: right;
        border-bottom-right-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 4px;
        border-top-left-radius: 4px;
        border-right: 3px solid #727cf5;
    }
    
    .rtl .timeline .event::before {
        left: 0;
        right: -170px;
    }
    
    .rtl .timeline .event::after {
        left: 0;
        right: -55.8px;
    }
    </style>
    
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="card-body">
                        <h6 class="card-title">Timeline</h6>
                        <div id="content">
                            <ul class="timeline">
                                <li class="event" data-date="12:30 - 1:00pm">
                                    <h3>Registration</h3>
                                    <p>Get here on time, it's first come first serve. Be late, get turned away.</p>
                                </li>
                                <li class="event" data-date="2:30 - 4:00pm">
                                    <h3>Opening Ceremony</h3>
                                    <p>Get ready for an exciting event, this will kick off in amazing fashion with MOP & Busta Rhymes as an opening show.</p>
                                </li>
                                <li class="event" data-date="5:00 - 8:00pm">
                                    <h3>Main Event</h3>
                                    <p>This is where it all goes down. You will compete head to head with your friends and rivals. Get ready!</p>
                                </li>
                                <li class="event" data-date="8:30 - 9:30pm">
                                    <h3>Closing Ceremony</h3>
                                    <p>See how is the victor and who are the losers. The big stage is where the winners bask in their own glory.</p>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    you will note that the css is at the top of the code which you can leave there or move to your custom stylesheet, it’s up to you.
    Please give this a try.

    Best regards,
    Mike

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