0

So, i have:

<div class="wrapper">

    <div class="full-width">
        <div class="header">
            <a href="">
                <img src="img/logo.png" alt="Logo" class="logo img-responsive" />
            </a>
            <nav>
                <ul class="nav nav-pills">
                    <li><a href="">Moden Web Design</a></li>
                    <li><a href="">Prices</a></li>
                    <li><a href="">Demonstration</a></li>
                    <li><a href="">Contact Us</a></li>
                </ul>
            </nav>
        </div>
    </div>
</div>

inside a <div class="wrapper">, that has the width:1100px;. So the question is if i can somehow make the div class="full-width" with a full width background... Because it stops at the .wrapper's margins.

I tried this method, but it doesn't work:

.full-width {
    height:50px;
    position:absolute;
    width:100%;
    z-index:100;
}
davidkonrad
  • 83,997
  • 17
  • 205
  • 265
asertym
  • 120
  • 1
  • 1
  • 6

4 Answers4

2

I don't know your whole code but here's a Fiddle

.full-width {
  background: #333;
  height: 50px;
  position: absolute;
  left: 0;
  margin-top: 100px;
  width: 100%;
  z-index: 100;
}
Milan and Friends
  • 5,560
  • 1
  • 20
  • 28
0

Maybe, you could add left:0px; and try it again. You could also try using a negative margin or a width over 100%. I hope, that helped ;)

Tim Nikischin
  • 368
  • 1
  • 18
0

you can set the size of the background using

background-size {
 Xpx Ypx;
}

or you can try giving a background to full-width's container.

Alex
  • 27
  • 9
-1

Set your css to max-width:100%; max-height:100%;

Also, read http://unstoppablerobotninja.com/entry/fluid-images

PMint
  • 246
  • 2
  • 13