How to properly place regions?
Hello everyone, any time of the day!
Could you experienced folks let me know which CSS properties are missing?
I want to add two regions to the theme: User bar 1st and 2nd. But I can't get them to align in one line with margin auto, or to be centered.
Drupal 7.
In page.tpl.php, the code looks like this:
<div class="zone-user-wrapper">
<div id='userbarfirst'>
<?php if ($page['user_first']): ?>
<?php print render($page['user_first']); ?></div>
<?php endif; ?>
<div id='userbarsecond'>
<?php if ($page['user_second']): ?>
<?php print render($page['user_second']); ?></div>
<?php endif; ?>
</div>
And here are the CSS styles (as they currently look; I've already tried deleting and adding, but it doesn't work. It only works with float left or right, but that's not suitable):
.zone-user-wrapper {
margin-top: -5em;
z-index: 200;
display: block;
clear: none;
}
.zone-user-wrapper {
background-color: #00779C;
height: 3em;
min-width: 650px !important;
width: 100%;
}
#userbarfirst {
float: right;
height: 38px;
margin-right: 2.5em;
margin-top: 0;
padding-right: 0;
position: relative;
width: 377px;
display: block;
margin-left: auto;
margin-right: auto;
}
#userbarsecond {
float: right;
height: 35px;
margin-top: 0;
position: inherit;
width: auto;
margin-right: 1px;
display: block;
margin-left: auto;
margin-right: auto;
}
I would appreciate any help!