Connecting Tech Pros Worldwide Help | Site Map

Aligning Text

unstoppablekatia's Avatar
Newbie
 
Join Date: Feb 2009
Location: USA
Posts: 6
#1: Feb 13 '09
I have a website that has images on it, and underneath the images are text. My only option of aligning the images and text separate from each other, is to do <div align="right">, <center>, or <div align="left">. Neither of them help with what I want to do, and nor does <display:inline> or <float:right>, even adding them to the image links does no good.

My Question: I would like the images to be right next to each other on the page, with the text, not one below the other. Can you give me the correct code/s?
Expert
 
Join Date: Aug 2008
Posts: 397
#2: Feb 13 '09

re: Aligning Text


No doubt whatsover that this is a reasonable and good question. Got a clickable link to to the page in question?
unstoppablekatia's Avatar
Newbie
 
Join Date: Feb 2009
Location: USA
Posts: 6
#3: Feb 13 '09

re: Aligning Text


I sure do.

http://giveback.bridgettesdiary.com

There is a list of charities I've listed for my readers to help out, and I need those aligned together in pairs of two.

Thanks for your help in advance! :-D
drhowarddrfine's Avatar
Expert
 
Join Date: Sep 2006
Posts: 5,561
#4: Feb 13 '09

re: Aligning Text


This is one way to do it. Get rid of <center> and the <br>s:
Expand|Select|Wrap|Line Numbers
  1. <p style="width:500px;margin:0 auto">
  2. <a href="http://www.marchofdimes.com/">
  3. <img style="float:left" src="http://i41.tinypic.com/28t8aia.png"/></a>
  4. Give a helping hand to infants in need.
  5. The March of Dimes is dedicated to improving
  6. the life of infants by preventing birth defects,
  7. premature delivery, and infant mortality,
  8. See what you can do today!
  9. </p>
<center> is deprecated. Don't have time to mess with this this morning.
unstoppablekatia's Avatar
Newbie
 
Join Date: Feb 2009
Location: USA
Posts: 6
#5: Feb 13 '09

re: Aligning Text


Thanks for the help, but I didn't mean the text aligned next to the photo. I meant photo and photo. I liked the text underneath. Any other ideas?
Expert
 
Join Date: Aug 2008
Posts: 397
#6: Feb 13 '09

re: Aligning Text


Ouch! You are unlikely to get much help for your favorite charities from your readers feeding 185 markup errors combined with frozen mousetype in a table based layout.

It is 2009, not 1999-- time to ditch tables for layout and the deprecated coding practices associated with them...

Doctype moved to strict. Garbage code deleted. Tables ditched. Markup and CSS validated. Cursory checked at +4 in compliant browsers and at text-size "largest" in IE 6 & 7.
http://www.chelseacreekstudio.com/ca/cssd/heart.htm

Good luck.
unstoppablekatia's Avatar
Newbie
 
Join Date: Feb 2009
Location: USA
Posts: 6
#7: Feb 13 '09

re: Aligning Text


Lol, thanks for the help, but do you think someone that bad at HTML would be able to make that with no in-depth instructions? *numb*
Expert
 
Join Date: Aug 2008
Posts: 397
#8: Feb 13 '09

re: Aligning Text


If an online example doesn't do it for you, knock yourself out and take a university course, or take an online course, or buy a book, or flail around until you find someone willing to stoop to whatever level of mediocrity you wish...
unstoppablekatia's Avatar
Newbie
 
Join Date: Feb 2009
Location: USA
Posts: 6
#9: Feb 13 '09

re: Aligning Text


I hope you don't get me wrong here, it's just that I have a very busy life, the blogging is a hobby. I'm only 14, you can't expect me to know the how-tos of modern and hip HTML/CSS and I have barely any time to learn any. I started out with a Blogger template. Hopefully I'll get to take some courses this year on the topic. Thanks for all your help!

What are some books you recommend on that form of HTML?
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,629
#10: Feb 13 '09

re: Aligning Text


Quote:

Originally Posted by unstoppablekatia View Post

What are some books you recommend on that form of HTML?

http://www.alistapart.com/articles/alaprimer2/
http://www.alistapart.com/articles/ALAprimer/
there are some good remarks in the discussions, too

a quite comprehensive list, in my opinion
unstoppablekatia's Avatar
Newbie
 
Join Date: Feb 2009
Location: USA
Posts: 6
#11: Feb 13 '09

re: Aligning Text


Quote:

Originally Posted by Dormilich View Post

http://www.alistapart.com/articles/alaprimer2/
http://www.alistapart.com/articles/ALAprimer/
there are some good remarks in the discussions, too

a quite comprehensive list, in my opinion

Thanks! I'll be sure to check those out.
Reply

Tags
aligning text images