Connecting Tech Pros Worldwide Help | Site Map

Help needed positioning elements

GaryM
Guest
 
Posts: n/a
#1: Jul 20 '05
I hope someone can help me with this, I've been ploughing through the
CSS 2 specs for a while trying to figure this out. Anyway...

I am designing an index page for a website that has information about
different properties, like an estate agent's (or realtor's if you
prefer) site. I want to have it like this:

Name of property
Information Photograph

Where the name is left-aligned, the photograph is right-aligned, and
the information is centre-aligned in the space between the photograph
and the margin. I also want the whole thing to be contained in a block
that I can define the height of, and the photograph must stretch to
fill the height of the containing block.

I have been experimenting with "floats" for a while, and setting the
"height" for the image to 100%, but I just seem to end up with
photographs overlapping different paragraphs. Please help! Thanks.
Spartanicus
Guest
 
Posts: n/a
#2: Jul 20 '05

re: Help needed positioning elements


GaryM wrote:
[color=blue]
>I am designing an index page for a website that has information about
>different properties, like an estate agent's (or realtor's if you
>prefer) site. I want to have it like this:
>
>Name of property
> Information Photograph
>
>Where the name is left-aligned, the photograph is right-aligned, and
>the information is centre-aligned in the space between the photograph
>and the margin.[/color]

http://www.spartanicus.utvinternet.ie/test/GaryM.htm
[color=blue]
>I also want the whole thing to be contained in a block
>that I can define the height of, and the photograph must stretch to
>fill the height of the containing block.
>
>I have been experimenting with "floats" for a while, and setting the
>"height" for the image to 100%, but I just seem to end up with
>photographs overlapping different paragraphs.[/color]

Don't stretch or shrink images by specifying incorrect width and/or
height in the code, use a graphics editor to resize them properly.

--
Spartanicus
Closed Thread