What does decide length of container?


#1

https://www.codecademy.com/courses/web-ext/projects/html-css-prj_innovation-cloud

What does decide length(height) of container in the header?
Does it automatically set up by this code?

.header .container {
  position:relative;


html, body {
	margin: 0;
	padding: 0;
}

body {
	font-family: 'Roboto', sans-serif;
	font-weight: 100;
}

.container {
	margin: 0 auto;
	max-width: 940px;
}

/* Header */
.header {
  background:url("https://s3.amazonaws.com/codecademy-content/projects/innovation-cloud/bg.jpg") center center / cover no-repeat;
  height:800px;
  text-align:center;
}

.header .container {
  position:relative;
  top:200px;
}

.container {
  margin:0 auto;
  max-width:940px;
  padding:0 10px;
}


#2

if you don't set a width and height, the width and height are auto, so they expand if more space is required (elements inside the div, like heading and paragraphs)


#3

Thank you for reply!


#4

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.