Image in line with text |
Image in line with text |
Seniorbfc |
Feb 22 2017, 10:40 AM
Post
#1
|
Newbie Group: Members Posts: 17 Joined: 16-January 17 Member No.: 26,267 |
How can I get my image in line with my text on the right of it. I have included the code to show what I have tried and an image to show the (unexpected) outcome. P.s. I don't know if "#about img" is a legit thing, i've only just started learning about this stuff .
CODE <div id="about"> <h3>About</h3> <p>My name is Joshua Senior, I am a second-year student at Sheffield Hallam University studying BSc Hons Accounting and Finance. I have had a keen interest in finance since I was a child and knew that this was the career path I wanted to follow after high-school.</p> <img src="Printer.jpg" alt="Printer" style="width:30px; height:30px;"> </div> CODE #about{ background: rgba(64,64,64,1); width: 100%; height: 300px; } #about h3, #about p, #about img{ display: inline-block; padding-top: 40px; } #about h3{ padding-left: 550px; color: rgba(153,153,153,1); float: left; } #about p{ color: white; padding-right: 700px; float: right; width: 500px; text-align: left; } #about img{ float: right; } Attached thumbnail(s) |
Lo-Fi Version | Time is now: 24th April 2024 - 10:03 AM |