Petran
Petran

Reputation: 8077

css 100% width when horizontall scrollbar

I want to have a header with 100% width, in some cases there is a horizontal scrollbar and that causes the div to cover the visible area and not the whole parent element.

.cont {
width: 100%;
}

http://jsfiddle.net/BhRdV/1/

Upvotes: 0

Views: 67

Answers (1)

STEEL
STEEL

Reputation: 10107

There are certain cases, where even if you don't set width to DIV, it will still scale 100%.

Also, please be clear with ur question.

<div style="width:1200px;">
<div style="width:100%;">Tadda</div>
<div>Tadda 2</div>
</div>

Upvotes: 1

Related Questions