Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Jack Clarke
1,335 PointsText between two images
Hi,
I have just completed the 'How to Make a Website' course and I wanted to make an adjustment to the About page.
For those who haven't made or seen the completed website, it currently looks like this http://treehousewebsite.com/about.html. I wanted to make it look a bit like this https://www.dropbox.com/s/z7hug6u84qbtu7h/desktop.jpg (but with the text wrapped. I made that on Photoshop :p).
I have tried playing around with floating the discount image to the right etc. but I can't seem to get it where I want it.
Does anyone know how to do this, and if so, can you tell me?
Hopefully you can help,
Thanks
6 Answers

Paul Johnson
18,924 PointsHi,
I've been playing around with the workspace as I have finished that course too. I gave the p element on the page an id of "about" and the image an id of "thouse", using the following css they all sit next to each other nicely.
.profile-photo {
float: left;
margin: 0 5% 80px 0;
}
#thouse {
float:left;
}
#about {
float:left;
max-width: 33%;
}
This goes into responsive.css
There is probably a far better way to do this, but it worked for me.

Jonathan Grieve
Treehouse Moderator 91,254 PointsTry floating the second image to the right and decreasing the width of your text? :-)

Jack Clarke
1,335 PointsHi,
Thanks, but it is still hanging low like this https://www.dropbox.com/s/p6a064ve33h9jgn/Screen%20Shot%202014-05-27%20at%2013.31.48.png.
Any other ways I can do it?

Jack Clarke
1,335 PointsHi,
Thanks, but it is still hanging low like this https://www.dropbox.com/s/p6a064ve33h9jgn/Screen%20Shot%202014-05-27%20at%2013.31.48.png.
Any other ways I can do it?

Jack Clarke
1,335 PointsOops, double-posted :p

Sebastian Bachmann
7,046 PointsHi,
or you define a new section for the image, like this for example:
<section class="left">
<!-- profile picture 200x200 -->
<img src="img/nick.jpg" alt="Photograf of ..." class="profile-photo">
<h3>About</h3>
<p>Hi, i am ...</p>
<p>If you'd like to follow me on twitter, my username is <a href="http://www.twitter.com/...">...</p>
</section>
<section class="right">
<p>Test</p>
</section>
and in your css file you go like this
.left
{
float: left;
}
.right {
float: right;
}
Hope that helps and you get the idea ...
Regards, Sebastian

Jack Clarke
1,335 PointsHi,
Sorry to annoy you all but it nothing seems to be working for me at all. I have tried all of the suggestions but they just don't want to work!
Looks like I will just have to be content with the Treehouse image being below.
Thanks for you help!

Sebastian Bachmann
7,046 PointsSo Jack Clarke
see my code and look for the changes in the html code where i added another section and the classes left and right. And have a look into the css definitions in the main.css file in the about page section.
Regards, Sebastian
Jack Clarke
1,335 PointsJack Clarke
1,335 PointsHi,
Thanks but I have just tried that and it now looks like this... https://www.dropbox.com/s/rvgo8zo1sakz56g/Screen%20Shot%202014-05-27%20at%2014.15.03.png
Thanks anyway
Paul Johnson
18,924 PointsPaul Johnson
18,924 PointsYou've added more text, did you add a second p element or is the text all in one p element? Can you post the html code for the about page and the css code?
Sebastian Bachmann
7,046 PointsSebastian Bachmann
7,046 PointsJack Clarke can you share some HTML and CSS code of yours please ...
Jack Clarke
1,335 PointsJack Clarke
1,335 PointsHi. Sorry, yes I added some more text using multiple p elements like Nick did in the video. My code is below:
HTML:
Main CSS:
Responsive CSS:
Sebastian Bachmann
7,046 PointsSebastian Bachmann
7,046 PointsPaul Johnson
18,924 PointsPaul Johnson
18,924 PointsTry wrapping the p elements in a div like this
Then in the responsive.css add the following in the first media query
Jack Clarke
1,335 PointsJack Clarke
1,335 PointsThank you very much, Paul Johnson. It is finally perfect. There are few padding and margin issues that I need to fix but otherwise, it is great. Thanks!