The Best way to display Images and text

This is a discussion on "The Best way to display Images and text" within the Website Planning section. This forum, and the thread "The Best way to display Images and text are both part of the Planning Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Planning Your Website > Website Planning

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Nov 18th, 2007, 13:08
Reputable Member
Join Date: Oct 2007
Location: At my house
Age: 22
Posts: 193
Thanks: 0
Thanked 0 Times in 0 Posts
The Best way to display Images and text

What is the best way to display images and text next to each other. I tried to place the image and text within a <div> tag and <p> tag like this:

Code: Select all
 <div class="profiles">
<p style="float: left"><img src="image.jpg" /></p>
<p> Info info info</p>
</div>
But when I tried to create more than one, they began to show up all over the place. I even tried a blank <div> with an "&nbsp;" to separate them, but that didn't work.

This is for a band page for my church where I want to display each band members image to the left of there profile info. This is for a final project due soon.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Nov 18th, 2007, 14:45
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

Here's the best way:
html
Code: Select all
<div class="profiles"><img src="yourimage.jpg" class="image"/>
Info info info<br />
info info info
</div>
<div class="profiles"><img src="yourimage" class="image"/>
Info info info<br />
info info info
</div>
CSS:

Code: Select all
.profiles {
 width:250px;
 float: left;
 margin-right: 20px;
 font-family: 14px Arial, Helvetica, sans-serif;
 text-align: left;
 }
 
.image {
 float: left;
 margin-right: 10px;
 margin-bottom: 10px;
 }
This is just the basics but it will take two images with two write ups and place them side by side horizontally.

I hope that's what you were asking for.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Nov 18th, 2007, 23:57
Reputable Member
Join Date: Oct 2007
Location: At my house
Age: 22
Posts: 193
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

So I don't need to wrap the text in <p> tags? Ok I will do that and let you know how it turns out. Thanks for your help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Nov 19th, 2007, 01:00
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

You can wrap them in p tags but you do not have.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Nov 19th, 2007, 09:27
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

Quote:
Originally Posted by Lchad View Post
You can wrap them in p tags but you do not have.
If your text is a paragraph, then you should put it inside a <p>.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Nov 19th, 2007, 12:06
Reputable Member
Join Date: Oct 2007
Location: At my house
Age: 22
Posts: 193
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

Right, thanks!. The container's width is 800px, the left content within is 600px and the right content within is 200px. What do I do if I want each one of them to occur in a vertical alignment. Do I change the div class width? Or don't set a width at all?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Nov 19th, 2007, 12:33
Elite Veteran
Join Date: Sep 2006
Location: Pink House
Posts: 3,946
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

Set a width of 800px on both and they will align one under the other.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Nov 19th, 2007, 13:56
Reputable Member
Join Date: Oct 2007
Location: At my house
Age: 22
Posts: 193
Thanks: 0
Thanked 0 Times in 0 Posts
Re: The Best way to display Images and text

Thank you very much.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Best way to display images/ Keeping file size down Oak Graphics and 3D 17 May 27th, 2008 17:03
Display different images? sing2trees Classic ASP 6 Jan 16th, 2008 05:15
display text elmasduro JavaScript Forum 0 Apr 27th, 2007 04:07
Different Text Display in Different Browser ??? j4mes_bond25 Web Page Design 0 Jul 6th, 2006 17:26
Use form to display non-preset images...? Mikemc JavaScript Forum 2 Feb 2nd, 2006 00:03


All times are GMT. The time now is 09:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42