The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Image in line with text
Seniorbfc
post 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 tongue.gif .
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)
Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
Seniorbfc   Image in line with text   Feb 22 2017, 10:40 AM
pandy   The image isn't the only thing floating. Put i...   Feb 22 2017, 12:42 PM
Seniorbfc   Thanks :P   Feb 26 2017, 10:13 AM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd October 2019 - 11:45 AM