3 replies [Last post]
mridang_agarwalla
Offline
Regular
Last seen: 14 years 10 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Hi guys,

I need some help here.

COuld someone show me how to line up the information next to the image

http://www.mridang.info/gallery/album.html

I have two little images below which there is a line of text in gray and a line of text in white. The line of text should be aligned beside the image while the line of text in white will remain where it is. How do I line up the gray text beside the image.

Any help from you CSS gurus is greatly appreciated. Smile

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 28 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

You mean like this: <p

You mean like this:

mridang_agarwalla
Offline
Regular
Last seen: 14 years 10 weeks ago
Joined: 2007-10-30
Posts: 20
Points: 0

Hi ClevaTreva, I did as you

Hi ClevaTreva,

I did as you said and the text appeared beside the image but the text is bottom aligned in relation to the image. How do I middle align it vertically?

ClevaTreva
ClevaTreva's picture
Offline
Guru
A hilly place, UK
Last seen: 3 years 28 weeks ago
A hilly place, UK
Joined: 2004-02-05
Posts: 2902
Points: 0

Give the paragraph a line

Give the paragraph a line height the same as the height of the image and then set the vertical align to middle.

Either that or float the image to the left with the html as it was before I suggested that last change, here's the css:

.image{ float:left; display:inline; margin-right:10px; }