Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Align text to the left and right on the same line with CSS

I am working on my about page and having trouble with this. Trying to align the (years or pending) to the right side of the column. See image for example.

Top is how it looks now. Bottom image is how I want it to look.

enter image description here

Site is located at http://www.eatlovepray.me/portfolio/about-me/

like image 249
user3808918 Avatar asked Jan 10 '23 06:01

user3808918


2 Answers

Try to use span and then set the style equals 'float:right'

<span style="float:right">pending </span>
like image 139
Haoyu Chen Avatar answered Jan 12 '23 20:01

Haoyu Chen


Demo

css

ul {
    list-style: none;
}
#about ul li span {
    float: right;
}

html

<div id="about">
     <h3><strong>Education</strong></h3>

    <ul>
        <li><strong>Golden West College – Huntington Beach, CA <span>2012-2014</span></strong>

        </li>
        <li>– Associate in Arts Degree – Digital Arts Major <span>(pending)</span>
        </li><br/>
        <li>Certificate of Achievement</li>
        <li>– Graphic Design and Production Option <span>(pending)</span>
        </li><br/>
        <li>Certificate of Specialization</li>
        <li>– Graphic Design Foundation <span>6/2014</span>
        </li>
        <li>– Graphic Design Advanced Production <span>(pending)</span>
        </li>
    </ul>
</div>
like image 31
4dgaurav Avatar answered Jan 12 '23 18:01

4dgaurav