F
Fredo Vincentis
I am trying to align four blocks of text using stylesheets in the following
way:
XX
XX
So two blocks at the top, two at the bottom.
I have been trying to do it for a while, but I can't get them to behave the
way I want.
As I do not know how long the text will be in each section I put the top two
text blocks into a <div> and the bottom two text blocks into a <div>, both
of which are positioned relatively (top:0px, left:0px to a parent element
holding all four. The right text blocks have been moved absolutely to their
parent elements.
But what is happening at the moment is that the two left text blocks overlap
eachother and so do the two right text blocks. It seems the relative
positioning of the bottom two blocks does not work the way i expect it.
Any idea what I am doing wrong?
Here comes the code:
#bottomSection{
position: absolute;
width:711px;
top:186px;
left:36px;
background-color:#FFFFFF;
}
..homeBlock{
position:relative;
top:0px;
left:0px;
}
..rightHome{
position:absolute;
left:370px;
top:0px;
}
..leftHome{
position:absolute;
left:0px;
top:0px;
}
<div id="bottomSection">
<!-- content starts here -->
<div class="homeBlock">
<div class="leftHome">
<h1 class="home">Experience Design</h1>
<p class="home">Oh, no, it is an ever fixed mark let me not to the
marriage of true minds
or bends with the remover to remove. It is the star to every wand'ring
bark,
if this be error and upon me proved, love alters not with his brief
hours
and weeks. Love's not time's fool, though rosy lips and cheeks which
alters
when it alteration finds, let me not to the marriage of true minds.</p>
</div>
<div class="rightHome">
<h1 class="home">What do we do?</h1>
<p class="home">Oh, no, it is an ever fixed mark let me not to the
marriage of true minds
or bends with the remover to remove.</p>
<p><a href="#">»Websites</a><br>
<a href="#">»Interactive Cd-Roms</a><br>
<a href="#">»Corporate Presentations</a></p>
</div>
</div>
<div class="homeBlock">
<div class="leftHome">
<h1 class="home">Addictive News</h1>
<p class="home"><a href="#">Winner of the Golden Web Award</a> [24
September 2003]</p>
<p class="home">Combined with optimal use of human resources,
quantitative analysis of
all the key ratios has a vital role to play in this building a dynamic
relationship...</p>
</div>
<div class="rightHome">
<h1 class="home">What do we do now?</h1>
<p class="home">Oh, no, it is an ever fixed mark let me not to the
marriage of true minds
or bends with the remover to remove.</p>
<p><a href="#">»Websites</a><br>
<a href="#">»Interactive Cd-Roms</a><br>
<a href="#">»Corporate Presentations</a></p>
</div>
</div>
<!-- content ends here -->
</div>
way:
XX
XX
So two blocks at the top, two at the bottom.
I have been trying to do it for a while, but I can't get them to behave the
way I want.
As I do not know how long the text will be in each section I put the top two
text blocks into a <div> and the bottom two text blocks into a <div>, both
of which are positioned relatively (top:0px, left:0px to a parent element
holding all four. The right text blocks have been moved absolutely to their
parent elements.
But what is happening at the moment is that the two left text blocks overlap
eachother and so do the two right text blocks. It seems the relative
positioning of the bottom two blocks does not work the way i expect it.
Any idea what I am doing wrong?
Here comes the code:
#bottomSection{
position: absolute;
width:711px;
top:186px;
left:36px;
background-color:#FFFFFF;
}
..homeBlock{
position:relative;
top:0px;
left:0px;
}
..rightHome{
position:absolute;
left:370px;
top:0px;
}
..leftHome{
position:absolute;
left:0px;
top:0px;
}
<div id="bottomSection">
<!-- content starts here -->
<div class="homeBlock">
<div class="leftHome">
<h1 class="home">Experience Design</h1>
<p class="home">Oh, no, it is an ever fixed mark let me not to the
marriage of true minds
or bends with the remover to remove. It is the star to every wand'ring
bark,
if this be error and upon me proved, love alters not with his brief
hours
and weeks. Love's not time's fool, though rosy lips and cheeks which
alters
when it alteration finds, let me not to the marriage of true minds.</p>
</div>
<div class="rightHome">
<h1 class="home">What do we do?</h1>
<p class="home">Oh, no, it is an ever fixed mark let me not to the
marriage of true minds
or bends with the remover to remove.</p>
<p><a href="#">»Websites</a><br>
<a href="#">»Interactive Cd-Roms</a><br>
<a href="#">»Corporate Presentations</a></p>
</div>
</div>
<div class="homeBlock">
<div class="leftHome">
<h1 class="home">Addictive News</h1>
<p class="home"><a href="#">Winner of the Golden Web Award</a> [24
September 2003]</p>
<p class="home">Combined with optimal use of human resources,
quantitative analysis of
all the key ratios has a vital role to play in this building a dynamic
relationship...</p>
</div>
<div class="rightHome">
<h1 class="home">What do we do now?</h1>
<p class="home">Oh, no, it is an ever fixed mark let me not to the
marriage of true minds
or bends with the remover to remove.</p>
<p><a href="#">»Websites</a><br>
<a href="#">»Interactive Cd-Roms</a><br>
<a href="#">»Corporate Presentations</a></p>
</div>
</div>
<!-- content ends here -->
</div>