Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

hr not displaying within this container block...

Enthusiast ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

Need some help trying to sort out why the hr is not falling into the row of the container. It just won't display.

My guess is something with the display or positioning needs to be adjusted?

hr {

        color: #cccccc;

        display: inline-block;

        position: absolute;

        }

.header {

    background-image:url('images/header-bg.png');

    border-bottom:#ccc 3px solid;

    height:174px;

    margin: 0 auto;

    position: fixed;

    top: 0;

    left: 0;

    z-index: 99999;

    width: 100%;

}

<div class="col-xs-12">

        <div class="header"><!--structural container overall-->

                <div class="container"><div class="row">

                    <div class="Mlogo"><!--includes top/bottom padding for logo-->

                    <a target="_blank" href="#"><img src="images/logo.png" class="img-responsive" alt="logo"></a>

                     </div>

                    <hr>

                   <div class="nav col-md-9">

                   <ul class="nav"><li class="nav"><a target="_blank" href="#">Link</a></li></ul>

                  </div>  

         </div></div></div></div></div>

Can you advise how I can clean this up? Thank you!

Views

302
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , May 09, 2017 May 09, 2017

You will probably find it is being displayed at the very top of your page.

Giving it a position of absolute takes it out of the normal content flow. As you have already quoted from the css specs in another discussion, look at the specs for the use of position absolute, and pay particular attention to the default values.

edit -the above depends on that being your entire page structure, please always try to post a link to the complete page, as 'snippets' will often lead to an incorrect or out of con

...

Votes

Translate
LEGEND ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

You will probably find it is being displayed at the very top of your page.

Giving it a position of absolute takes it out of the normal content flow. As you have already quoted from the css specs in another discussion, look at the specs for the use of position absolute, and pay particular attention to the default values.

edit -the above depends on that being your entire page structure, please always try to post a link to the complete page, as 'snippets' will often lead to an incorrect or out of context answer.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 09, 2017 May 09, 2017

Copy link to clipboard

Copied

LATEST

Count your <div> and </div> tags.  They don't match.

Nancy

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines