क्षेत्रों को सही तरीके से कैसे व्यवस्थित करें?
सभी को नमस्कार, किसी भी समय!
कृपया अनुभवी लोगों से बताएं कि कौन सी CSS की पंक्तियाँ गायब हैं।
मैं विषय में दो क्षेत्र जोड़ना चाहता हूँ। User bar 1st और 2nd। लेकिन उन्हें एक ही पंक्ति में margin auto के साथ रखना नहीं हो रहा है, या वे समान रूप से या बीच में नहीं आ रहे हैं।
Drupal 7।
page.tpl.php में कोड इस प्रकार है:
<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>
और यहाँ CSS शैलियाँ हैं (जैसा कि वे वर्तमान में दिखती हैं, मैंने पहले ही हटा दिया है और जोड़ा है, लेकिन यह काम नहीं कर रहा है। केवल float left या right के साथ ही काम हो रहा है, लेकिन यह उपयुक्त नहीं है):
.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;
}
किसी भी मदद के लिए मैं आभारी रहूँगा!