How to make an element as wide as its parent if its position is fixed












2














I want to create a navigation with an image on the left and the navigation bar on the right. The position of the navigation is fixed.
The problem is that the navigation is now wider than the body around it.



How could I make the navigation as wide as the body while having it position fixed?






body {
margin: 20px 20px 0; }
body nav {
top: 0;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>





https://jsfiddle.net/he4c6ur9/










share|improve this question
























  • You set width:100% so it as parent
    – לבני מלכה
    Nov 12 '18 at 9:41
















2














I want to create a navigation with an image on the left and the navigation bar on the right. The position of the navigation is fixed.
The problem is that the navigation is now wider than the body around it.



How could I make the navigation as wide as the body while having it position fixed?






body {
margin: 20px 20px 0; }
body nav {
top: 0;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>





https://jsfiddle.net/he4c6ur9/










share|improve this question
























  • You set width:100% so it as parent
    – לבני מלכה
    Nov 12 '18 at 9:41














2












2








2







I want to create a navigation with an image on the left and the navigation bar on the right. The position of the navigation is fixed.
The problem is that the navigation is now wider than the body around it.



How could I make the navigation as wide as the body while having it position fixed?






body {
margin: 20px 20px 0; }
body nav {
top: 0;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>





https://jsfiddle.net/he4c6ur9/










share|improve this question















I want to create a navigation with an image on the left and the navigation bar on the right. The position of the navigation is fixed.
The problem is that the navigation is now wider than the body around it.



How could I make the navigation as wide as the body while having it position fixed?






body {
margin: 20px 20px 0; }
body nav {
top: 0;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>





https://jsfiddle.net/he4c6ur9/






body {
margin: 20px 20px 0; }
body nav {
top: 0;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>





body {
margin: 20px 20px 0; }
body nav {
top: 0;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
width: 100%;
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>






html css sass






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 12 '18 at 9:41







dun

















asked Nov 12 '18 at 9:32









dundun

11218




11218












  • You set width:100% so it as parent
    – לבני מלכה
    Nov 12 '18 at 9:41


















  • You set width:100% so it as parent
    – לבני מלכה
    Nov 12 '18 at 9:41
















You set width:100% so it as parent
– לבני מלכה
Nov 12 '18 at 9:41




You set width:100% so it as parent
– לבני מלכה
Nov 12 '18 at 9:41












1 Answer
1






active

oldest

votes


















2














Your nav is bigger than the body tag because you set margins on body, of 20px.



If you set left and right position properties to 20px (the same as the body's margin), your nav would be as wide as its parent (the body tag).



https://jsfiddle.net/dbku29oc/






body {
margin: 20px 20px 0; }
body nav {
top: 0;
left: 20px;
right: 20px;
background-color: #fff;
padding: 10px 10px 0 0;
display: flex;
justify-content: space-between;
/*width: 100%;*/
position: fixed;
z-index: 99;
height: 80px; }
body nav .nav__logo {
width: 180px;
padding: 10px 0; }
body nav .nav__logo img {
width: 100%; }
body nav .nav__bar {
display: flex;
padding-right: 30px;
padding-left: 0;
justify-content: flex-end;
align-items: center;
flex: 1; }
body nav .nav__bar li {
margin: 0 20px; }
body nav .nav__bar .bar__level1 {
display: inline-flex; }

/*# sourceMappingURL=style.css.map */

<!DOCTYPE html>
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
<title>Nav bar problem</title>
<link href="style.css" rel="stylesheet"/>
</head>

<body>
<nav>
<div class="nav__logo">
<a href="/" title="Start">
<img src="">
</a>
</div>
<div class="nav__bar">
<ul class="bar__level1">
<li><p>Start</p></li>
<li><p>Item1</p></li>
<li><p>Item2</p></li>
<li><p>Item3</p></li>
<li><p>Item4</p></li>
</ul>
</div>
</nav>
<main>

</main>
</body>








share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53259279%2fhow-to-make-an-element-as-wide-as-its-parent-if-its-position-is-fixed%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    2














    Your nav is bigger than the body tag because you set margins on body, of 20px.



    If you set left and right position properties to 20px (the same as the body's margin), your nav would be as wide as its parent (the body tag).



    https://jsfiddle.net/dbku29oc/






    body {
    margin: 20px 20px 0; }
    body nav {
    top: 0;
    left: 20px;
    right: 20px;
    background-color: #fff;
    padding: 10px 10px 0 0;
    display: flex;
    justify-content: space-between;
    /*width: 100%;*/
    position: fixed;
    z-index: 99;
    height: 80px; }
    body nav .nav__logo {
    width: 180px;
    padding: 10px 0; }
    body nav .nav__logo img {
    width: 100%; }
    body nav .nav__bar {
    display: flex;
    padding-right: 30px;
    padding-left: 0;
    justify-content: flex-end;
    align-items: center;
    flex: 1; }
    body nav .nav__bar li {
    margin: 0 20px; }
    body nav .nav__bar .bar__level1 {
    display: inline-flex; }

    /*# sourceMappingURL=style.css.map */

    <!DOCTYPE html>
    <head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
    <title>Nav bar problem</title>
    <link href="style.css" rel="stylesheet"/>
    </head>

    <body>
    <nav>
    <div class="nav__logo">
    <a href="/" title="Start">
    <img src="">
    </a>
    </div>
    <div class="nav__bar">
    <ul class="bar__level1">
    <li><p>Start</p></li>
    <li><p>Item1</p></li>
    <li><p>Item2</p></li>
    <li><p>Item3</p></li>
    <li><p>Item4</p></li>
    </ul>
    </div>
    </nav>
    <main>

    </main>
    </body>








    share|improve this answer




























      2














      Your nav is bigger than the body tag because you set margins on body, of 20px.



      If you set left and right position properties to 20px (the same as the body's margin), your nav would be as wide as its parent (the body tag).



      https://jsfiddle.net/dbku29oc/






      body {
      margin: 20px 20px 0; }
      body nav {
      top: 0;
      left: 20px;
      right: 20px;
      background-color: #fff;
      padding: 10px 10px 0 0;
      display: flex;
      justify-content: space-between;
      /*width: 100%;*/
      position: fixed;
      z-index: 99;
      height: 80px; }
      body nav .nav__logo {
      width: 180px;
      padding: 10px 0; }
      body nav .nav__logo img {
      width: 100%; }
      body nav .nav__bar {
      display: flex;
      padding-right: 30px;
      padding-left: 0;
      justify-content: flex-end;
      align-items: center;
      flex: 1; }
      body nav .nav__bar li {
      margin: 0 20px; }
      body nav .nav__bar .bar__level1 {
      display: inline-flex; }

      /*# sourceMappingURL=style.css.map */

      <!DOCTYPE html>
      <head>
      <meta charset="utf-8"/>
      <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
      <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
      <title>Nav bar problem</title>
      <link href="style.css" rel="stylesheet"/>
      </head>

      <body>
      <nav>
      <div class="nav__logo">
      <a href="/" title="Start">
      <img src="">
      </a>
      </div>
      <div class="nav__bar">
      <ul class="bar__level1">
      <li><p>Start</p></li>
      <li><p>Item1</p></li>
      <li><p>Item2</p></li>
      <li><p>Item3</p></li>
      <li><p>Item4</p></li>
      </ul>
      </div>
      </nav>
      <main>

      </main>
      </body>








      share|improve this answer


























        2












        2








        2






        Your nav is bigger than the body tag because you set margins on body, of 20px.



        If you set left and right position properties to 20px (the same as the body's margin), your nav would be as wide as its parent (the body tag).



        https://jsfiddle.net/dbku29oc/






        body {
        margin: 20px 20px 0; }
        body nav {
        top: 0;
        left: 20px;
        right: 20px;
        background-color: #fff;
        padding: 10px 10px 0 0;
        display: flex;
        justify-content: space-between;
        /*width: 100%;*/
        position: fixed;
        z-index: 99;
        height: 80px; }
        body nav .nav__logo {
        width: 180px;
        padding: 10px 0; }
        body nav .nav__logo img {
        width: 100%; }
        body nav .nav__bar {
        display: flex;
        padding-right: 30px;
        padding-left: 0;
        justify-content: flex-end;
        align-items: center;
        flex: 1; }
        body nav .nav__bar li {
        margin: 0 20px; }
        body nav .nav__bar .bar__level1 {
        display: inline-flex; }

        /*# sourceMappingURL=style.css.map */

        <!DOCTYPE html>
        <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
        <title>Nav bar problem</title>
        <link href="style.css" rel="stylesheet"/>
        </head>

        <body>
        <nav>
        <div class="nav__logo">
        <a href="/" title="Start">
        <img src="">
        </a>
        </div>
        <div class="nav__bar">
        <ul class="bar__level1">
        <li><p>Start</p></li>
        <li><p>Item1</p></li>
        <li><p>Item2</p></li>
        <li><p>Item3</p></li>
        <li><p>Item4</p></li>
        </ul>
        </div>
        </nav>
        <main>

        </main>
        </body>








        share|improve this answer














        Your nav is bigger than the body tag because you set margins on body, of 20px.



        If you set left and right position properties to 20px (the same as the body's margin), your nav would be as wide as its parent (the body tag).



        https://jsfiddle.net/dbku29oc/






        body {
        margin: 20px 20px 0; }
        body nav {
        top: 0;
        left: 20px;
        right: 20px;
        background-color: #fff;
        padding: 10px 10px 0 0;
        display: flex;
        justify-content: space-between;
        /*width: 100%;*/
        position: fixed;
        z-index: 99;
        height: 80px; }
        body nav .nav__logo {
        width: 180px;
        padding: 10px 0; }
        body nav .nav__logo img {
        width: 100%; }
        body nav .nav__bar {
        display: flex;
        padding-right: 30px;
        padding-left: 0;
        justify-content: flex-end;
        align-items: center;
        flex: 1; }
        body nav .nav__bar li {
        margin: 0 20px; }
        body nav .nav__bar .bar__level1 {
        display: inline-flex; }

        /*# sourceMappingURL=style.css.map */

        <!DOCTYPE html>
        <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
        <title>Nav bar problem</title>
        <link href="style.css" rel="stylesheet"/>
        </head>

        <body>
        <nav>
        <div class="nav__logo">
        <a href="/" title="Start">
        <img src="">
        </a>
        </div>
        <div class="nav__bar">
        <ul class="bar__level1">
        <li><p>Start</p></li>
        <li><p>Item1</p></li>
        <li><p>Item2</p></li>
        <li><p>Item3</p></li>
        <li><p>Item4</p></li>
        </ul>
        </div>
        </nav>
        <main>

        </main>
        </body>








        body {
        margin: 20px 20px 0; }
        body nav {
        top: 0;
        left: 20px;
        right: 20px;
        background-color: #fff;
        padding: 10px 10px 0 0;
        display: flex;
        justify-content: space-between;
        /*width: 100%;*/
        position: fixed;
        z-index: 99;
        height: 80px; }
        body nav .nav__logo {
        width: 180px;
        padding: 10px 0; }
        body nav .nav__logo img {
        width: 100%; }
        body nav .nav__bar {
        display: flex;
        padding-right: 30px;
        padding-left: 0;
        justify-content: flex-end;
        align-items: center;
        flex: 1; }
        body nav .nav__bar li {
        margin: 0 20px; }
        body nav .nav__bar .bar__level1 {
        display: inline-flex; }

        /*# sourceMappingURL=style.css.map */

        <!DOCTYPE html>
        <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
        <title>Nav bar problem</title>
        <link href="style.css" rel="stylesheet"/>
        </head>

        <body>
        <nav>
        <div class="nav__logo">
        <a href="/" title="Start">
        <img src="">
        </a>
        </div>
        <div class="nav__bar">
        <ul class="bar__level1">
        <li><p>Start</p></li>
        <li><p>Item1</p></li>
        <li><p>Item2</p></li>
        <li><p>Item3</p></li>
        <li><p>Item4</p></li>
        </ul>
        </div>
        </nav>
        <main>

        </main>
        </body>





        body {
        margin: 20px 20px 0; }
        body nav {
        top: 0;
        left: 20px;
        right: 20px;
        background-color: #fff;
        padding: 10px 10px 0 0;
        display: flex;
        justify-content: space-between;
        /*width: 100%;*/
        position: fixed;
        z-index: 99;
        height: 80px; }
        body nav .nav__logo {
        width: 180px;
        padding: 10px 0; }
        body nav .nav__logo img {
        width: 100%; }
        body nav .nav__bar {
        display: flex;
        padding-right: 30px;
        padding-left: 0;
        justify-content: flex-end;
        align-items: center;
        flex: 1; }
        body nav .nav__bar li {
        margin: 0 20px; }
        body nav .nav__bar .bar__level1 {
        display: inline-flex; }

        /*# sourceMappingURL=style.css.map */

        <!DOCTYPE html>
        <head>
        <meta charset="utf-8"/>
        <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/>
        <title>Nav bar problem</title>
        <link href="style.css" rel="stylesheet"/>
        </head>

        <body>
        <nav>
        <div class="nav__logo">
        <a href="/" title="Start">
        <img src="">
        </a>
        </div>
        <div class="nav__bar">
        <ul class="bar__level1">
        <li><p>Start</p></li>
        <li><p>Item1</p></li>
        <li><p>Item2</p></li>
        <li><p>Item3</p></li>
        <li><p>Item4</p></li>
        </ul>
        </div>
        </nav>
        <main>

        </main>
        </body>






        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 12 '18 at 10:53

























        answered Nov 12 '18 at 9:48









        Josu AstigarragaJosu Astigarraga

        444




        444






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53259279%2fhow-to-make-an-element-as-wide-as-its-parent-if-its-position-is-fixed%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Full-time equivalent

            さくらももこ

            13 indicted, 8 arrested in Calif. drug cartel investigation