By Drandarian Grey on
Ok, as I am still learning php etc I would like to ask how to solve this problem I am having.
Now I am trying to but Three user block regions into my theme.
What I have so far in page.tpl.php is
<!-- Users Area -->
<?php if ($user1): ?>
<div id="user1" class="user1">
<?php print $user1 ?>
</div> <!-- /User1-->
<?php endif; ?>
<?php if ($user2): ?>
<div id="user2" class="user2">
<?php print $user2 ?>
</div> <!-- /User2-->
<?php endif; ?>
<?php if ($user3): ?>
<div id="user3" class="user3">
<?php print $user3 ?>
</div> <!-- /User3-->
<?php endif; ?>
</div>
<!-- End Users Area-->
So at the present they line up like
User1
User2
User3
What I am trying to do is
User1 User2 User3
I am sure this is possible but have not figured out the what for's of it yet. Any ideas are really appreciated.
DG
Comments
Floating
Floating is your friend in this instance. You'll want to add the style
float:left;to the first two user classes (user1 and user2), and then addclear:both;to the third class (user3). This all is changed in your CSS stylesheet (style.css or styles.css).well ok sort of.
At the moment user 1 and user 2 are beside each other but user 3 is still below 1 and 2
Example:
User1 User2
User3
DG
..
Wasn't thinking clearly earlier. You need to add
float:left;to all three of those divs, and then after those you should add a new div<div style="clear:both;"></div>to prevent anything else from going onto that line.
Or you can simply not add any floating or clearing to the third user div..this may work as well.
thanks
Will give that a shot, and see how I get along. I must say there is a lot still for me to learn about css and php...
DG
Edit: Thanks that worked well. now to keep pushing on.