Question: I have been searching on how to draw a border line that has shorter length that it container for few days. Basically I want to achieve below results i.e borders that do not have reach its edge. 
[![enter image description here](https://i.stack.imgur.com/dDhgR.png)](https://i.stack.imgur.com/dDhgR.png)

So far this is what I have achieved:
[![enter image description here](https://i.stack.imgur.com/1FqS7.png)](https://i.stack.imgur.com/1FqS7.png)

I was thinking it is impossible and not supported by android drawable, until I found this post [Howto draw a half border in xml android](https://stackoverflow.com/questions/41219580/howto-draw-a-half-border-in-xml-android) . It illustrates how to draw a C shape border by using android drawable layer list. I tried to modify and fit into my purpose, but I cannot achieve the expected result

I am not good in android drawable and please let me know if you have any idea.

Answer: 
```
   $(window).scroll(function(){
          var scrolltop = $(this).scrollTop();
           if(scrolltop >=100){
                $('#pre-header,#id-of-your-logo').css('display','none');
           }
           else{
                $('#pre-header,#id-of-your-logo').css('display','block');
           }

```

Hope this helps..
Bootstrap navbar animation on scroll: <http://codepen.io/davidtmiller/pen/yepJoX>
and when you scroll nav bar change it's class to .affix and you can hide preheader like this.

```
.navbar-default.affix #preheader{
   display: none;
}

```