在我的页脚上居中图像

时间:2016-11-21 01:45:16

标签: html css

我想弄清楚如何将徽标图像置于我的页脚上。我希望它能够随着浏览器的变化而扩展,但保持在中心内部。如果有人知道如何解决这个问题真有帮助!谢谢!我非常感谢所有这方面的帮助。我现在已经弄明白了,我很高兴。

.msum {
  position: absolute;
  bottom: 5%;
  width: 100%;
  display: block;
  width: 200px;
  height: 50px;
}
/*Rest of Code*/

figure.stayssame {
  width: 100%;
}
figure video {
  width: 100%;
  height: 80%;
}
p {
  padding: 2%;
}
.video-txt {
  position: absolute;
  top: 30%;
  z-index: 9;
  color: #FFF;
  width: 100%;
  text-align: center;
  font-size: 40px;
}
object {
  position: absolute;
  left: 0%;
  top: -5%;
  z-index: 10;
  width: 15%;
}
/*ALL CODE FROM DESKTOP*/

figure.adjustable {
  width: 29%;
}
html {
  position: relative;
  min-height: 100%;
}
body {
  margin: 0 0 100px;
  /* bottom = footer height */
  font-family: 'Inconsolata', monospace;
  /*font-family: 'Courier New', sans-serif;*/
  font-weight: 300;
  font-size: 20px;
  line-height: 1.4em;
}
.squish {
  margin-right: 125px;
}
.text {
  padding: 5px;
}
.button {
  margin-bottom: 50px;
  margin-left: 20%
}
header {
  position: fixed;
  z-index: 1000;
  width: 100%;
  top: 0px;
  background-color: #670809;
  height: 70px;
  letter-spacing: 1px;
  line-height: 55px;
  padding: 9px;
  word-spacing: 5px;
}
header,
h1,
h2 {
  font-family: 'Orbitron', sans-serif;
}
.space {
  padding: 5px;
  color: white;
}
nav {
  float: left;
  width: 100%;
}
nav ul li.active a {
  background-color: none;
  color: white;
  text-decoration: none;
}
nav ul li a:hover {
  color: #00E3FF;
}
nav ul li a:visited {
  text-decoration: none;
}
/*nav ul li a {
		display:inline-block;
		
		padding: 1 px;
		
		color: #fff;
		letter-spacing: 1 px;
		text-decoration:none;
		text-transform: uppercase;
		margin: .55em;
		font-size: 5 px;
		float: right;
		
	}

nav ul li.active a {
	/*background-color: none;
	 color: white;
	 text-decoration:none;
	}
	 a:hover {
	/*background-color:none;
	 color:black;
	 background-color:#00E3FF;
	
	}
	
	
	
	nav ul li a:visited {
	color:black;
	text-decoration:none;	
	}
*/

form {
  padding-left: 20%;
}
/* header tags */

h1 {
  text-align: center;
  color: #013397;
  font-size: 40px;
  padding-top: 50px;
}
h2 {
  text-align: center;
  color: #00E3FF;
  font-size: 30px;
  margin: 5px;
  padding: 20px;
}
p {
  text-align: left;
}
.clearfix:after {
  content: " ";
  display: block;
  clear: both;
}
#box {
  background-color: #94DBEC;
}
hr.style2 {
  border-top: 3px double #00E3FF;
  width: 300px
}
section {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 35px;
}
img.adjustable {
  width: 100%;
  max-width: 100%;
  height: auto;
  /* max-width: 400px;
	max-height: 400px;*/
  margin: 1em;
  /*width: 90%;
	margin:5%;*/
}
#inner {
  height: 100px;
  padding: 15px 0;
}
#container {
  height: 100%;
}
.imgbox5 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox4 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox3 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox2 {
  padding-right: 30px;
}
.imgbox {
  padding-right: 30px;
  padding-left: 0px;
}
#firstpara {
  background-color: #5E5757;
  color: white;
}
#secpara {
  background-color: #5E5757;
  color: white;
}
#thirdpara {
  background-color: #5E5757;
  color: white;
}
#fourthpara {
  background-color: #5E5757;
  color: white;
}
#primary {
  background-color: #5E5757;
  color: white;
}
#enroll {
  margin: 0;
  padding: 0;
}
/*section{
	text-align: center;
	width: 100%;
	
	}*/

footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100px;
  padding-bottom: 2%;
  background-color: #670809;
  font-family: 'Inconsolata', monospace;
  /* text */
  padding-left: 10px;
  padding-top: 15px;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
}
a {
  color: white;
}
a,
a:active {
  color: white;
  text-decoration: none;
}
.side {
  left-margin: 10px;
  right-margin: 10px;
}
object {
  position: absolute;
  top: 350px;
  left: 100px;
  height: 100px;
  width: 200px;
  z-index: 2000;
}
#headline {
  text-align: center;
  position: absolute;
  top: 10%;
  left: 35%;
  color: #00E3FF;
  line-height: 20px;
  font-family: 'Orbitron', sans-serif;
  word-spacing: 1px;
  font-size: 12px;
}
#value {
  background-color: #5E5757;
  color: white;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2%;
}
#title {
  color: white;
  text-align: center;
  padding-top: 10px;
}
img {
  width: 100%;
  display: block;
}
/*.img{
border-width:thick;
	border-style:solid;
border-color:white;		
}

.column-right{
	float: right;
	width: 30%;
	padding: 1%;
	
	}
.column-center{
	display: inline-block;
	width: 30%;
	padding: 1%;
	
	bottom: 18px;
	
	
	}
	
	.column-left{
	float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
	width: 30%;
	padding: 1%;
	
	

	}
	
	#left-box{
	
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
	
}
#middle-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;

}

#right-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
  position: relative;
  display:inline-block;
  color:black;
  font-weight: bold;
  top: 20px;
  right: 31px;
  background-color:white;
  border-bottom-left-radius: 10px;
  padding: 6px;
  margin: 9px;
  width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;	
}

#button1{
color:black;
position:relative;
top: 155px;
right:36px;	
}

*/

/*NAV BAR*/

@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
 html {
  font-size: 62.5%;
  font-family: 'Open Sans', sans-serif;
}
body {
  font-size: 1.6rem;
  min-height: 100vh;
}
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.6rem;
}
header {
  position: relative;
}
main {
  padding: 2rem;
}
/***************** NAVIGATION ********************/

nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  background: #670809;
}
nav ul,
nav li {
  flex: 1;
}
nav li:last-child {
  border-bottom: none;
}
nav a {
  text-decoration: none;
  color: inherit;
  display: block;
  font-size: 1.8rem;
}
nav a:hover {
  background:
  /*#adacac*/
  #555;
  color: #fff;
}
nav li {
  position: relative;
  line-height: 50px;
  color: #fff;
  text-align: center;
}
nav input,
nav label {
  display: none;
  width: 36px;
  height: 36px;
  background: #555;
  color: #fff;
  text-align: center;
  line-height: 36px;
  font-size: 1.6rem;
  border-radius: 4px;
}
nav label {
  position: absolute;
  top: 8px;
  right: 8px;
  transition: .4s;
}
nav label:hover {
  cursor: pointer;
}
nav label:before {
  font-family: FontAwesome;
  font-size: 24px;
  content: "\f0c9";
  text-align: center;
}
/*************** MEDIA QUERIES *******************/

nav ul {
  transform: translateY(0);
  box-shadow: 0 0 5px rgba(0, 0, 0, .7);
  transition: all .5s;
}
nav li {
  flex: none;
  width: 100%;
  border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
  transform: translateY(-100%);
  width: 100%;
  background: #999;
  transition: all .5s;
}
nav label {
  display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
  background: #777;
  color: #fff;
}
#css-toggle-menu {
  float: right;
  margin: 10px;
}
<footer>
  <a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
  <div class="text">
     &copy; 2016</div>
  <br>
  <img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>

4 个答案:

答案 0 :(得分:3)

.msum {
    position: absolute;
    bottom: 5%;
    width: 100%;
    display: block;
    width: 200px;
    height: 50px;
    //add this
    left: 0;
    right: 0;
    margin: 0 auto;
}

答案 1 :(得分:3)

这里不需要position: absolute。对img.msum

执行这些操作
  • 删除position: absolute;
  • 添加margin: auto;

<强>段

.msum {
  display: block;
  width: 200px;
  height: 50px;
  margin: auto;
}
/*Rest of Code*/

figure.stayssame {
  width: 100%;
}
figure video {
  width: 100%;
  height: 80%;
}
p {
  padding: 2%;
}
.video-txt {
  position: absolute;
  top: 30%;
  z-index: 9;
  color: #FFF;
  width: 100%;
  text-align: center;
  font-size: 40px;
}
object {
  position: absolute;
  left: 0%;
  top: -5%;
  z-index: 10;
  width: 15%;
}
/*ALL CODE FROM DESKTOP*/

figure.adjustable {
  width: 29%;
}
html {
  position: relative;
  min-height: 100%;
}
body {
  margin: 0 0 100px;
  /* bottom = footer height */
  font-family: 'Inconsolata', monospace;
  /*font-family: 'Courier New', sans-serif;*/
  font-weight: 300;
  font-size: 20px;
  line-height: 1.4em;
}
.squish {
  margin-right: 125px;
}
.text {
  padding: 5px;
}
.button {
  margin-bottom: 50px;
  margin-left: 20%
}
header {
  position: fixed;
  z-index: 1000;
  width: 100%;
  top: 0px;
  background-color: #670809;
  height: 70px;
  letter-spacing: 1px;
  line-height: 55px;
  padding: 9px;
  word-spacing: 5px;
}
header,
h1,
h2 {
  font-family: 'Orbitron', sans-serif;
}
.space {
  padding: 5px;
  color: white;
}
nav {
  float: left;
  width: 100%;
}
nav ul li.active a {
  background-color: none;
  color: white;
  text-decoration: none;
}
nav ul li a:hover {
  color: #00E3FF;
}
nav ul li a:visited {
  text-decoration: none;
}
/*nav ul li a {
		display:inline-block;
		
		padding: 1 px;
		
		color: #fff;
		letter-spacing: 1 px;
		text-decoration:none;
		text-transform: uppercase;
		margin: .55em;
		font-size: 5 px;
		float: right;
		
	}

nav ul li.active a {
	/*background-color: none;
	 color: white;
	 text-decoration:none;
	}
	 a:hover {
	/*background-color:none;
	 color:black;
	 background-color:#00E3FF;
	
	}
	
	
	
	nav ul li a:visited {
	color:black;
	text-decoration:none;	
	}
*/

form {
  padding-left: 20%;
}
/* header tags */

h1 {
  text-align: center;
  color: #013397;
  font-size: 40px;
  padding-top: 50px;
}
h2 {
  text-align: center;
  color: #00E3FF;
  font-size: 30px;
  margin: 5px;
  padding: 20px;
}
p {
  text-align: left;
}
.clearfix:after {
  content: " ";
  display: block;
  clear: both;
}
#box {
  background-color: #94DBEC;
}
hr.style2 {
  border-top: 3px double #00E3FF;
  width: 300px
}
section {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 35px;
}
img.adjustable {
  width: 100%;
  max-width: 100%;
  height: auto;
  /* max-width: 400px;
	max-height: 400px;*/
  margin: 1em;
  /*width: 90%;
	margin:5%;*/
}
#inner {
  height: 100px;
  padding: 15px 0;
}
#container {
  height: 100%;
}
.imgbox5 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox4 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox3 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox2 {
  padding-right: 30px;
}
.imgbox {
  padding-right: 30px;
  padding-left: 0px;
}
#firstpara {
  background-color: #5E5757;
  color: white;
}
#secpara {
  background-color: #5E5757;
  color: white;
}
#thirdpara {
  background-color: #5E5757;
  color: white;
}
#fourthpara {
  background-color: #5E5757;
  color: white;
}
#primary {
  background-color: #5E5757;
  color: white;
}
#enroll {
  margin: 0;
  padding: 0;
}
/*section{
	text-align: center;
	width: 100%;
	
	}*/

footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100px;
  padding-bottom: 2%;
  background-color: #670809;
  font-family: 'Inconsolata', monospace;
  /* text */
  padding-left: 10px;
  padding-top: 15px;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
}
a {
  color: white;
}
a,
a:active {
  color: white;
  text-decoration: none;
}
.side {
  left-margin: 10px;
  right-margin: 10px;
}
object {
  position: absolute;
  top: 350px;
  left: 100px;
  height: 100px;
  width: 200px;
  z-index: 2000;
}
#headline {
  text-align: center;
  position: absolute;
  top: 10%;
  left: 35%;
  color: #00E3FF;
  line-height: 20px;
  font-family: 'Orbitron', sans-serif;
  word-spacing: 1px;
  font-size: 12px;
}
#value {
  background-color: #5E5757;
  color: white;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2%;
}
#title {
  color: white;
  text-align: center;
  padding-top: 10px;
}
img {
  width: 100%;
  display: block;
}
/*.img{
border-width:thick;
	border-style:solid;
border-color:white;		
}

.column-right{
	float: right;
	width: 30%;
	padding: 1%;
	
	}
.column-center{
	display: inline-block;
	width: 30%;
	padding: 1%;
	
	bottom: 18px;
	
	
	}
	
	.column-left{
	float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
	width: 30%;
	padding: 1%;
	
	

	}
	
	#left-box{
	
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
	
}
#middle-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;

}

#right-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
  position: relative;
  display:inline-block;
  color:black;
  font-weight: bold;
  top: 20px;
  right: 31px;
  background-color:white;
  border-bottom-left-radius: 10px;
  padding: 6px;
  margin: 9px;
  width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;	
}

#button1{
color:black;
position:relative;
top: 155px;
right:36px;	
}

*/

/*NAV BAR*/

@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
 html {
  font-size: 62.5%;
  font-family: 'Open Sans', sans-serif;
}
body {
  font-size: 1.6rem;
  min-height: 100vh;
}
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.6rem;
}
header {
  position: relative;
}
main {
  padding: 2rem;
}
/***************** NAVIGATION ********************/

nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  background: #670809;
}
nav ul,
nav li {
  flex: 1;
}
nav li:last-child {
  border-bottom: none;
}
nav a {
  text-decoration: none;
  color: inherit;
  display: block;
  font-size: 1.8rem;
}
nav a:hover {
  background:
  /*#adacac*/
  #555;
  color: #fff;
}
nav li {
  position: relative;
  line-height: 50px;
  color: #fff;
  text-align: center;
}
nav input,
nav label {
  display: none;
  width: 36px;
  height: 36px;
  background: #555;
  color: #fff;
  text-align: center;
  line-height: 36px;
  font-size: 1.6rem;
  border-radius: 4px;
}
nav label {
  position: absolute;
  top: 8px;
  right: 8px;
  transition: .4s;
}
nav label:hover {
  cursor: pointer;
}
nav label:before {
  font-family: FontAwesome;
  font-size: 24px;
  content: "\f0c9";
  text-align: center;
}
/*************** MEDIA QUERIES *******************/

nav ul {
  transform: translateY(0);
  box-shadow: 0 0 5px rgba(0, 0, 0, .7);
  transition: all .5s;
}
nav li {
  flex: none;
  width: 100%;
  border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
  transform: translateY(-100%);
  width: 100%;
  background: #999;
  transition: all .5s;
}
nav label {
  display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
  background: #777;
  color: #fff;
}
#css-toggle-menu {
  float: right;
  margin: 10px;
}
<footer>
  <a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
  <div class="text">
    MaKayla McLain-Graning &copy; 2016</div>
  <br>
  <img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>

预览

enter image description here

答案 2 :(得分:1)

查看下面的代码段。您遗失的重要一点是使用CSS lefttransform属性。 (您会注意到我还包含了transform属性的供应商前缀变体,以确保它适用于所有主流浏览器)。此外,您会注意到我已使用absolute定位替换了您为.msum CSS选择器设置的relative定位。在这种情况下,这是更优化的,并确保您的图像不会与页脚中也存在的文本重叠。

.msum {
  position: relative;
  bottom: 5%;
  width: 100%;
  left: 50%;      /* Distribute from left-edge */
  display: block;
  width: 200px;
  height: 50px;
  
  /* Center horizontally */
  -webkit-transform: translateX(-50%);
  -moz-transform:    translateX(-50%);
  -ms-transform:     translateX(-50%);
  -o-transform:      translateX(-50%);
  transform:         translateX(-50%);
}
/*Rest of Code*/

figure.stayssame {
  width: 100%;
}
figure video {
  width: 100%;
  height: 80%;
}
p {
  padding: 2%;
}
.video-txt {
  position: absolute;
  top: 30%;
  z-index: 9;
  color: #FFF;
  width: 100%;
  text-align: center;
  font-size: 40px;
}
object {
  position: absolute;
  left: 0%;
  top: -5%;
  z-index: 10;
  width: 15%;
}
/*ALL CODE FROM DESKTOP*/

figure.adjustable {
  width: 29%;
}
html {
  position: relative;
  min-height: 100%;
}
body {
  margin: 0 0 100px;
  /* bottom = footer height */
  font-family: 'Inconsolata', monospace;
  /*font-family: 'Courier New', sans-serif;*/
  font-weight: 300;
  font-size: 20px;
  line-height: 1.4em;
}
.squish {
  margin-right: 125px;
}
.text {
  padding: 5px;
}
.button {
  margin-bottom: 50px;
  margin-left: 20%
}
header {
  position: fixed;
  z-index: 1000;
  width: 100%;
  top: 0px;
  background-color: #670809;
  height: 70px;
  letter-spacing: 1px;
  line-height: 55px;
  padding: 9px;
  word-spacing: 5px;
}
header,
h1,
h2 {
  font-family: 'Orbitron', sans-serif;
}
.space {
  padding: 5px;
  color: white;
}
nav {
  float: left;
  width: 100%;
}
nav ul li.active a {
  background-color: none;
  color: white;
  text-decoration: none;
}
nav ul li a:hover {
  color: #00E3FF;
}
nav ul li a:visited {
  text-decoration: none;
}
/*nav ul li a {
		display:inline-block;
		
		padding: 1 px;
		
		color: #fff;
		letter-spacing: 1 px;
		text-decoration:none;
		text-transform: uppercase;
		margin: .55em;
		font-size: 5 px;
		float: right;
		
	}

nav ul li.active a {
	/*background-color: none;
	 color: white;
	 text-decoration:none;
	}
	 a:hover {
	/*background-color:none;
	 color:black;
	 background-color:#00E3FF;
	
	}
	
	
	
	nav ul li a:visited {
	color:black;
	text-decoration:none;	
	}
*/

form {
  padding-left: 20%;
}
/* header tags */

h1 {
  text-align: center;
  color: #013397;
  font-size: 40px;
  padding-top: 50px;
}
h2 {
  text-align: center;
  color: #00E3FF;
  font-size: 30px;
  margin: 5px;
  padding: 20px;
}
p {
  text-align: left;
}
.clearfix:after {
  content: " ";
  display: block;
  clear: both;
}
#box {
  background-color: #94DBEC;
}
hr.style2 {
  border-top: 3px double #00E3FF;
  width: 300px
}
section {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 35px;
}
img.adjustable {
  width: 100%;
  max-width: 100%;
  height: auto;
  /* max-width: 400px;
	max-height: 400px;*/
  margin: 1em;
  /*width: 90%;
	margin:5%;*/
}
#inner {
  height: 100px;
  padding: 15px 0;
}
#container {
  height: 100%;
}
.imgbox5 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox4 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox3 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox2 {
  padding-right: 30px;
}
.imgbox {
  padding-right: 30px;
  padding-left: 0px;
}
#firstpara {
  background-color: #5E5757;
  color: white;
}
#secpara {
  background-color: #5E5757;
  color: white;
}
#thirdpara {
  background-color: #5E5757;
  color: white;
}
#fourthpara {
  background-color: #5E5757;
  color: white;
}
#primary {
  background-color: #5E5757;
  color: white;
}
#enroll {
  margin: 0;
  padding: 0;
}
/*section{
	text-align: center;
	width: 100%;
	
	}*/

footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100px;
  padding-bottom: 2%;
  background-color: #670809;
  font-family: 'Inconsolata', monospace;
  /* text */
  padding-left: 10px;
  padding-top: 15px;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
}
a {
  color: white;
}
a,
a:active {
  color: white;
  text-decoration: none;
}
.side {
  left-margin: 10px;
  right-margin: 10px;
}
object {
  position: absolute;
  top: 350px;
  left: 100px;
  height: 100px;
  width: 200px;
  z-index: 2000;
}
#headline {
  text-align: center;
  position: absolute;
  top: 10%;
  left: 35%;
  color: #00E3FF;
  line-height: 20px;
  font-family: 'Orbitron', sans-serif;
  word-spacing: 1px;
  font-size: 12px;
}
#value {
  background-color: #5E5757;
  color: white;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2%;
}
#title {
  color: white;
  text-align: center;
  padding-top: 10px;
}
img {
  width: 100%;
  display: block;
}
/*.img{
border-width:thick;
	border-style:solid;
border-color:white;		
}

.column-right{
	float: right;
	width: 30%;
	padding: 1%;
	
	}
.column-center{
	display: inline-block;
	width: 30%;
	padding: 1%;
	
	bottom: 18px;
	
	
	}
	
	.column-left{
	float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
	width: 30%;
	padding: 1%;
	
	

	}
	
	#left-box{
	
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
	
}
#middle-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;

}

#right-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
  position: relative;
  display:inline-block;
  color:black;
  font-weight: bold;
  top: 20px;
  right: 31px;
  background-color:white;
  border-bottom-left-radius: 10px;
  padding: 6px;
  margin: 9px;
  width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;	
}

#button1{
color:black;
position:relative;
top: 155px;
right:36px;	
}

*/

/*NAV BAR*/

@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
 html {
  font-size: 62.5%;
  font-family: 'Open Sans', sans-serif;
}
body {
  font-size: 1.6rem;
  min-height: 100vh;
}
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.6rem;
}
header {
  position: relative;
}
main {
  padding: 2rem;
}
/***************** NAVIGATION ********************/

nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  background: #670809;
}
nav ul,
nav li {
  flex: 1;
}
nav li:last-child {
  border-bottom: none;
}
nav a {
  text-decoration: none;
  color: inherit;
  display: block;
  font-size: 1.8rem;
}
nav a:hover {
  background:
  /*#adacac*/
  #555;
  color: #fff;
}
nav li {
  position: relative;
  line-height: 50px;
  color: #fff;
  text-align: center;
}
nav input,
nav label {
  display: none;
  width: 36px;
  height: 36px;
  background: #555;
  color: #fff;
  text-align: center;
  line-height: 36px;
  font-size: 1.6rem;
  border-radius: 4px;
}
nav label {
  position: absolute;
  top: 8px;
  right: 8px;
  transition: .4s;
}
nav label:hover {
  cursor: pointer;
}
nav label:before {
  font-family: FontAwesome;
  font-size: 24px;
  content: "\f0c9";
  text-align: center;
}
/*************** MEDIA QUERIES *******************/

nav ul {
  transform: translateY(0);
  box-shadow: 0 0 5px rgba(0, 0, 0, .7);
  transition: all .5s;
}
nav li {
  flex: none;
  width: 100%;
  border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
  transform: translateY(-100%);
  width: 100%;
  background: #999;
  transition: all .5s;
}
nav label {
  display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
  background: #777;
  color: #fff;
}
#css-toggle-menu {
  float: right;
  margin: 10px;
}
<footer>
  <a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
  <div class="text">
    MaKayla McLain-Graning &copy; 2016</div>
  <br>
  <img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>

答案 3 :(得分:-1)

.msum {
  position: absolute;
  bottom: 5%;
  width: 100%;
  display: block;
  width: 200px;
  height: 50px;
  left:50%;
  margin-left:-100px;
}
/*Rest of Code*/

figure.stayssame {
  width: 100%;
}
figure video {
  width: 100%;
  height: 80%;
}
p {
  padding: 2%;
}
.video-txt {
  position: absolute;
  top: 30%;
  z-index: 9;
  color: #FFF;
  width: 100%;
  text-align: center;
  font-size: 40px;
}
object {
  position: absolute;
  left: 0%;
  top: -5%;
  z-index: 10;
  width: 15%;
}
/*ALL CODE FROM DESKTOP*/

figure.adjustable {
  width: 29%;
}
html {
  position: relative;
  min-height: 100%;
}
body {
  margin: 0 0 100px;
  /* bottom = footer height */
  font-family: 'Inconsolata', monospace;
  /*font-family: 'Courier New', sans-serif;*/
  font-weight: 300;
  font-size: 20px;
  line-height: 1.4em;
}
.squish {
  margin-right: 125px;
}
.text {
  padding: 5px;
}
.button {
  margin-bottom: 50px;
  margin-left: 20%
}
header {
  position: fixed;
  z-index: 1000;
  width: 100%;
  top: 0px;
  background-color: #670809;
  height: 70px;
  letter-spacing: 1px;
  line-height: 55px;
  padding: 9px;
  word-spacing: 5px;
}
header,
h1,
h2 {
  font-family: 'Orbitron', sans-serif;
}
.space {
  padding: 5px;
  color: white;
}
nav {
  float: left;
  width: 100%;
}
nav ul li.active a {
  background-color: none;
  color: white;
  text-decoration: none;
}
nav ul li a:hover {
  color: #00E3FF;
}
nav ul li a:visited {
  text-decoration: none;
}
/*nav ul li a {
		display:inline-block;
		
		padding: 1 px;
		
		color: #fff;
		letter-spacing: 1 px;
		text-decoration:none;
		text-transform: uppercase;
		margin: .55em;
		font-size: 5 px;
		float: right;
		
	}

nav ul li.active a {
	/*background-color: none;
	 color: white;
	 text-decoration:none;
	}
	 a:hover {
	/*background-color:none;
	 color:black;
	 background-color:#00E3FF;
	
	}
	
	
	
	nav ul li a:visited {
	color:black;
	text-decoration:none;	
	}
*/

form {
  padding-left: 20%;
}
/* header tags */

h1 {
  text-align: center;
  color: #013397;
  font-size: 40px;
  padding-top: 50px;
}
h2 {
  text-align: center;
  color: #00E3FF;
  font-size: 30px;
  margin: 5px;
  padding: 20px;
}
p {
  text-align: left;
}
.clearfix:after {
  content: " ";
  display: block;
  clear: both;
}
#box {
  background-color: #94DBEC;
}
hr.style2 {
  border-top: 3px double #00E3FF;
  width: 300px
}
section {
  width: 85%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 35px;
}
img.adjustable {
  width: 100%;
  max-width: 100%;
  height: auto;
  /* max-width: 400px;
	max-height: 400px;*/
  margin: 1em;
  /*width: 90%;
	margin:5%;*/
}
#inner {
  height: 100px;
  padding: 15px 0;
}
#container {
  height: 100%;
}
.imgbox5 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox4 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox3 {
  padding-right: 30px;
  padding-left: 0px;
}
.imgbox2 {
  padding-right: 30px;
}
.imgbox {
  padding-right: 30px;
  padding-left: 0px;
}
#firstpara {
  background-color: #5E5757;
  color: white;
}
#secpara {
  background-color: #5E5757;
  color: white;
}
#thirdpara {
  background-color: #5E5757;
  color: white;
}
#fourthpara {
  background-color: #5E5757;
  color: white;
}
#primary {
  background-color: #5E5757;
  color: white;
}
#enroll {
  margin: 0;
  padding: 0;
}
/*section{
	text-align: center;
	width: 100%;
	
	}*/

footer {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100px;
  padding-bottom: 2%;
  background-color: #670809;
  font-family: 'Inconsolata', monospace;
  /* text */
  padding-left: 10px;
  padding-top: 15px;
  color: #ffffff;
  font-size: 15px;
  text-align: center;
}
a {
  color: white;
}
a,
a:active {
  color: white;
  text-decoration: none;
}
.side {
  left-margin: 10px;
  right-margin: 10px;
}
object {
  position: absolute;
  top: 350px;
  left: 100px;
  height: 100px;
  width: 200px;
  z-index: 2000;
}
#headline {
  text-align: center;
  position: absolute;
  top: 10%;
  left: 35%;
  color: #00E3FF;
  line-height: 20px;
  font-family: 'Orbitron', sans-serif;
  word-spacing: 1px;
  font-size: 12px;
}
#value {
  background-color: #5E5757;
  color: white;
  width: 90%;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2%;
}
#title {
  color: white;
  text-align: center;
  padding-top: 10px;
}
img {
  width: 100%;
  display: block;
}
/*.img{
border-width:thick;
	border-style:solid;
border-color:white;		
}

.column-right{
	float: right;
	width: 30%;
	padding: 1%;
	
	}
.column-center{
	display: inline-block;
	width: 30%;
	padding: 1%;
	
	bottom: 18px;
	
	
	}
	
	.column-left{
	float: left;file:///Volumes/MMG/webfix/video/techpic1.jpg
	width: 30%;
	padding: 1%;
	
	

	}
	
	#left-box{
	
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
	
}
#middle-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;

}

#right-box{
	background-color:#5E5757;
color: white;
padding: 15px;
border-radius:10px;
padding-bottom:135px;
}
.more {
  position: relative;
  display:inline-block;
  color:black;
  font-weight: bold;
  top: 20px;
  right: 31px;
  background-color:white;
  border-bottom-left-radius: 10px;
  padding: 6px;
  margin: 9px;
  width: 30%;
}
#button3, #button2{
color: black;
position:relative;
top: 36px;
right:36px;	
}

#button1{
color:black;
position:relative;
top: 155px;
right:36px;	
}

*/

/*NAV BAR*/

@import url("http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css");
@import url("http://fonts.googleapis.com/css?family=Open+Sans:400,300");
 html {
  font-size: 62.5%;
  font-family: 'Open Sans', sans-serif;
}
body {
  font-size: 1.6rem;
  min-height: 100vh;
}
h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}
h2 {
  font-size: 1.6rem;
}
header {
  position: relative;
}
main {
  padding: 2rem;
}
/***************** NAVIGATION ********************/

nav ul {
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  background: #670809;
}
nav ul,
nav li {
  flex: 1;
}
nav li:last-child {
  border-bottom: none;
}
nav a {
  text-decoration: none;
  color: inherit;
  display: block;
  font-size: 1.8rem;
}
nav a:hover {
  background:
  /*#adacac*/
  #555;
  color: #fff;
}
nav li {
  position: relative;
  line-height: 50px;
  color: #fff;
  text-align: center;
}
nav input,
nav label {
  display: none;
  width: 36px;
  height: 36px;
  background: #555;
  color: #fff;
  text-align: center;
  line-height: 36px;
  font-size: 1.6rem;
  border-radius: 4px;
}
nav label {
  position: absolute;
  top: 8px;
  right: 8px;
  transition: .4s;
}
nav label:hover {
  cursor: pointer;
}
nav label:before {
  font-family: FontAwesome;
  font-size: 24px;
  content: "\f0c9";
  text-align: center;
}
/*************** MEDIA QUERIES *******************/

nav ul {
  transform: translateY(0);
  box-shadow: 0 0 5px rgba(0, 0, 0, .7);
  transition: all .5s;
}
nav li {
  flex: none;
  width: 100%;
  border-bottom: solid 1px #777;
}
nav input[type="checkbox"]:checked + ul {
  transform: translateY(-100%);
  width: 100%;
  background: #999;
  transition: all .5s;
}
nav label {
  display: block;
}
nav input[type="checkbox"]:checked + ul li:nth-child(1) {
  background: #777;
  color: #fff;
}
#css-toggle-menu {
  float: right;
  margin: 10px;
}
<footer>
  <a id="enroll" href="https://www.mnstate.edu/eservices/"> Enroll Now</a>
  <div class="text">
    MaKayla McLain-Graning &copy; 2016</div>
  <br>
  <img class="msum" src="https://www.mnstate.edu/uploadedImages/Content/Marketing/logos/MSUM_Signature_Horiz_Color.jpg?n=808" alt="msum logo" />
</footer>