Brian
Brian

Reputation: 315

Remove scroll bar from div

Created a navigation bar and looks good in firefox then behold, in chrome and ie theres a scroll bar. How can I set the navigation so theres no scroll bar?

  header {
  width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-top: -7px;
  margin-top: -8px;
}

.nav {
  width: 600px;
  line-height: 0px;
  margin-left: auto;
  margin-right: auto;
}

.nav div {
  display: block;
  float: left;
  width: 20%;
  padding: 0px;
  margin: 0px;
  .nav img a {
    padding-right: 10px;
  }
<header>
  <div id="wrapper">
    <div class="nav">
      <div>
        <a href="index.html"><img width="103px" border="0" height="24" src="nav-01_over.gif"></a>
      </div>
      <div>
        <a href="company.html"><img src="nav-02.gif" width="103px" border="0" height="24"></a>
      </div>
      <div>
        <a href="products.html"><img src="nav-03.gif" width="103px" border="0" height="24"></a>
      </div>
      <div>
        <a href="solutions.html"><img src="nav-04.gif" width="103px" border="0" height="24"></a>
      </div>
      <div>
        <a href="investors.html"><img src="nav-05.gif" width="103px" border="0" height="24"></a>
      </div>
    </div>
</header>

Upvotes: 4

Views: 83089

Answers (4)

Abhay Sisodia
Abhay Sisodia

Reputation: 1

 $(function() {
    $( "#draggable" ).draggable();//drag out of window
    $( "#draggable" ).draggable({ containment: "window"});
 });

Upvotes: -2

PaulProgrammer
PaulProgrammer

Reputation: 17690

In your css, use overflow:hidden:

.nav div {
    display:block;
    float:left;
    width:20%;
    padding:0px;
    margin:0px;
    overflow:hidden
}

Also, your .nav div is missing a close brace

Upvotes: 17

Arda
Arda

Reputation: 6946

Add the CSS overflow-y:hidden to anything scrolling. It will hide the vertical scrollbar. If it's horizontal, use overflow-x: hidden.

Upvotes: 3

emerson.marini
emerson.marini

Reputation: 9348

By changing the CSS and adding:

overflow: hidden;

Upvotes: 7

Related Questions