jorgensen
17 Apr 2010, 03:29 PM
Hi there.....
First post :-)
I have read that it is oldtime to use tables as the main layout construction, therefore I give CSS / divs a go.
Things are going quite well, but I have this problem:
My site loads some pictures, of various sizes. They are placed inside a <div> with a 10 px border. Inside the <div> under the image, I have some text describing the image.
What I would like, is to get the width of the text to be the same as the image, but I can't figure out how ? I can set a fixed width for the text, but then it don't fits the image.
Does anyone have a tip to achieve this ?
Thanks
example:
http://www.rattenborg.com/download/20100417 css/css.jpg
First post :-)
I have read that it is oldtime to use tables as the main layout construction, therefore I give CSS / divs a go.
Things are going quite well, but I have this problem:
My site loads some pictures, of various sizes. They are placed inside a <div> with a 10 px border. Inside the <div> under the image, I have some text describing the image.
What I would like, is to get the width of the text to be the same as the image, but I can't figure out how ? I can set a fixed width for the text, but then it don't fits the image.
Does anyone have a tip to achieve this ?
Thanks
example:
http://www.rattenborg.com/download/20100417 css/css.jpg