Hello,
I'm trying to do a simple layout where I have text and a right-aligned photo. I can get it to work with one photo/text combination, but not more than one, as they start betting pushed down when image or text block differs in height.
Here's my test file:
Code:
<html>
<head>
<style type="text/css">
#content{
border:solid 1px;
padding: 30px 0 0 10px;
width: 310px;
}
#photo {
border: solid 1px;
padding: 50px 0 0 0;
width: 190px;
float: right;
text-align: center;
}
</style>
</head>
<body>
<div id="photo">image</div>
<div id="content">content goes here</div>
<div id="photo">image</div>
<div id="content">content goes here</div>
<div id="photo">image</div>
<div id="content">content goes here</div>
<div id="photo">image</div>
<div id="content">content goes here</div>
</body>
</html>
The problem is when the content or image goes long. I want everything underneath it to get pushed down, but I want each image to be top-aligned with it's corresponding content item.
Basically I have a fixed width content column, a fixed width image column (that centers differing width images within it) and I need to have gallery-style composition, where a block of text and it's corresponding image are always adjacent to each other.
I appreciate the help, thanks!
|