0

What does this type of WIDTH declaration means? (See Source HERE)

#content {
    float: left;
    min-height: 1px;
    width: 71.1702%;
}
Shaqpad
  • 107
  • 2
  • 13
  • 4
    It means #content will be 71.1702% of its container object – cport1 Oct 24 '14 at 01:01
  • 1
    If you are wondering about the decimal places, read this: [Are the decimal places in a CSS width respected?](http://stackoverflow.com/questions/4308989/are-the-decimal-places-in-a-css-width-respected) – kums Oct 24 '14 at 01:06

1 Answers1

2

It is saying that the div #content will be 71.1702% of it's parent's width.

example:

If parent's width is 100% of screen, then #content will be 71.1702% of screen.

If parent's width is 400px, then #content will be 71.1702% of 400px.

Topr
  • 872
  • 3
  • 21
  • 34
Tim Roberts
  • 1,120
  • 2
  • 9
  • 25
  • 1
    Strictly, it is the nearest block container ancestor box, which is often, but not necessarily the parent. For example, it would not be the parent if the parent was an inline element. – Alohci Oct 24 '14 at 01:17
  • I think I remember reading this somewhere but I have yet to run into a time where I've used it without it being the width of its parents. Kinda one of those "technically but in production..." sorta things. – Tim Roberts Oct 24 '14 at 01:20