image height 100% doesn't work

  • (2 Pages)
  • +
  • 1
  • 2

21 Replies - 5708 Views - Last Post: 27 September 2013 - 12:34 PM

#16 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: image height 100% doesn't work

Posted 25 September 2013 - 05:18 PM

Sorry I couldn't find that validator. However, I was able to fix one error, but I'm not understanding the following two errors. Sorry I'm new to the endif in css.

7 html Parse Error [ ( height: 100%; ) /* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */ .container]
70 Parse Error Lexical error at line 72, column 3. Encountered: "[" (91), after : "<!"
Was This Post Helpful? 0
  • +
  • -

#17 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3836
  • View blog
  • Posts: 13,583
  • Joined: 12-December 12

Re: image height 100% doesn't work

Posted 25 September 2013 - 05:29 PM

As I have mentioned before you are still incorrectly following the html, body selectors with round brackets.

Your if-endif construct is using the wrong syntax - the wrong sequence of characters, and the style-tag they enclose is not closed.

However, if this is a separate (external) stylesheet then these style-tags, and the if-endif construct, don't belong in there.
Was This Post Helpful? 0
  • +
  • -

#18 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: image height 100% doesn't work

Posted 25 September 2013 - 05:35 PM

oh ok, that makes sense. This is an external style sheet. Thank you so much for being patient with me.
Was This Post Helpful? 0
  • +
  • -

#19 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3836
  • View blog
  • Posts: 13,583
  • Joined: 12-December 12

Re: image height 100% doesn't work

Posted 25 September 2013 - 06:20 PM

No worries ;). Good luck.
Was This Post Helpful? 0
  • +
  • -

#20 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: image height 100% doesn't work

Posted 26 September 2013 - 06:38 PM

I fixed those errors but the images still aren't the height of the body.

/*@charset "utf-8";
 CSS Document */
html, body { 
	height: 100%;
}
/* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */
.container {
	width: 100%;/*original width 80%;
	max-width: 1260px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */
	min-width: 780px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */
	background: #FFF;
	margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
}

/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */

.sidebar1 {
	float: left;
	width: 15%;
	height:100%;
	margin-bottom:auto;
	border:dotted;
	border-color:#C0C;
	background-image: url(assets/road.jpg);
	background-repeat: no-repeat;
	margin-bottom:auto;
}
.content {
	padding: 10px 0;
	width: 60%;
	float: left;
}
nav {
	background-color: #B1977C;
	width: 200px;
	margin-left:auto;
	margin-right:auto;
 }

.sidebar2 {
	float: right;
	width: 20%;
	background-image: url(assets/road.jpg);
	background-repeat: no-repeat;
}
header {
	background-color: #735435;
}

/* ~~The footer ~~ */
.footer {
	padding: 10px 0;
	background: #6F7D94;
	position: relative;/* this gives IE6 hasLayout to properly clear */
	clear: both; /* this clear property forces the .container to understand where the columns end and contain them */
}
#photos {
	margin-right:auto;
	margin-left:auto;
	width:400px;
	padding:5px;
}
#mainContent {
	background-color: #e6dace;
	height: 100%;
	width: 100%;
}


Was This Post Helpful? 0
  • +
  • -

#21 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3577
  • View blog
  • Posts: 10,442
  • Joined: 08-June 10

Re: image height 100% doesn't work

Posted 27 September 2013 - 04:35 AM

the CSS validator is here.
Was This Post Helpful? 0
  • +
  • -

#22 mindiapolis  Icon User is offline

  • D.I.C Head

Reputation: -4
  • View blog
  • Posts: 175
  • Joined: 31-October 11

Re: image height 100% doesn't work

Posted 27 September 2013 - 12:34 PM

yes, and like I said the code validates but it does not look the way it should. `
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2