Skip to content

Instantly share code, notes, and snippets.

@gregwhitworth
Last active May 31, 2016 04:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregwhitworth/3d4b184eb923cdbcfdd3 to your computer and use it in GitHub Desktop.
Save gregwhitworth/3d4b184eb923cdbcfdd3 to your computer and use it in GitHub Desktop.
What color box should be visible to the user (just by viewing the code): blue or yellow?

I am wanting to get developer feedback on what you are expecting based on the code below. Please don't run the code in a browser to determine your answer. Purely based on your knowledge of CSS which color box should the user see? Blue or yellow? Leave your answer in the comments. Thank you!!

  <style type='text/css'>
    div, nav {
		width: 200px;
		height: 200px;
	}

	nav, div.c1 {
		position: fixed;
	}

	div.c1 {
		background: blue;
	}

	nav div {
		position: relative;
		z-index: 20;
		background: yellow;
	}
  </style>


  	<nav>			
		<div></div>
	</nav>

	<div class="c1"></div>   
@mdkitzman
Copy link

I'm going to go with Blue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment