css - Container overlapping to header -
i have problem container, overlapping header, how adjust in css? should under header little margin between header , container.
see screenshot here
#myheader { position: fixed; top: 0; left: 0; width: 100%; z-index: 100; background-color: yellow; box-shadow: 0px 2px 3px #888888; height: 150px; opacity:0.95; filter:alpha(opacity=10); } #mycontent { padding-top: 10px; } #mycontent .row { background-color: #fff; } #mycontent h1{ margin-top: 0; } <section id="mycontent"> <div class="container"> <div class="row"> <div class="col-sm-8 col-md-8 col-lg-8"> <div> <br /> <?php if ($breadcrumb): ?> <div id="breadcrumb"><?php print $breadcrumb; ?></div> <?php endif; ?> <?php print $messages; ?> <div id="content" class="column"><div class="section"> <a id="main-content"></a> <?php print render($title_prefix); ?> <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?> <?php print render($title_suffix); ?> <?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?> <?php print render($page['help']); ?> <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?> <?php print render($page['content']); ?> <?php print $feed_icons; ?> </div></div> <!-- /.section, /#content --> <?php if($is_front):?> <h2>mission & vision<br /></h2> <!-- <img src="<?php print(path_to_theme()); ?>/images/bottom.jpg" alt="" class="img-thumbnail pull-left" style="margin-right: 10px;" /> --> <div> our company comes trade few years ago beginning start professional projects. our not satisfied result. needs perfect. <br /><br /> that's why teach our employers still make them best in region. every 2 years give our employers test new technologies make sure leaders on market. <br /><br /> there no excuse fails. our standards high every time first rule quality. <br /><br /> can see in photogallery our references more. our company in touch partners qint, tsn-d or finishline... <br /><br /> come our company take prospects see if our portfolio fit vision , after can find best way how realize together! <br /><br /> </div> <?php endif; ?> </div> </div>
the header should inside container , give fixed width container
here example:
.container{ width:100%; max-width:500px; margin:0 auto; position:relative; background-color:yellow; padding-top:100px;} .header{ width:100%; max-width:500px; margin-left:-250px; left:50%; height:100px; background-color:red; position:fixed; top:0px; text-align:center;}
<div class="container"> <div class="header">header</div> container<br/> container<br/> container<br/> container<br/> container<br/> container<br/> </div>
Comments
Post a Comment