Skip to content

Instantly share code, notes, and snippets.

@remi
Forked from rafbm/challenge.md
Last active December 10, 2015 01:08
Show Gist options
  • Save remi/4355868 to your computer and use it in GitHub Desktop.
Save remi/4355868 to your computer and use it in GitHub Desktop.

CSS Challenge

You start with this:

<style>
  div {
    display: inline-block;
    width: 250px;
    padding: 20px;
    border: 1px solid grey;
    background: lightgrey;
  }
  ul {
    padding: 0;
  }
</style>

<div>
  <ul>
    <li>Foozle miz fiz</li>
    <li>Jazzle piz</li>
    <li>Shtrackle twiz</li>
  </ul>
</div>
<div>
  <ul>
    <li>Foozle doozle pizzle miz fiz</li>
    <li>Jazzle biz marzle piz</li>
    <li>Shtrackle shmarzle beezle twiz</li>
  </ul>
</div>
<div>
  <ul>
    <li>Foozle miz fiz</li>
    <li>Jazzle marzle piz</li>
    <li>Shtrackle beezle twiz</li>
  </ul>
</div>

And must end up with this:

You may add at most 3 CSS rules (eg. color: deeppink) and can’t add any selector.

Fork and edit start.html to show your solution! :)

<style>
div {
display: inline-block;
width: 250px;
padding: 20px;
border: 1px solid grey;
background: lightgrey;
text-align: center;
}
ul {
padding: 0;
display: inline-block;
text-align: left;
}
</style>
<div>
<ul>
<li>Foozle miz fiz</li>
<li>Jazzle piz</li>
<li>Shtrackle twiz</li>
</ul>
</div>
<div>
<ul>
<li>Foozle doozle pizzle miz fiz</li>
<li>Jazzle biz marzle piz</li>
<li>Shtrackle shmarzle beezle twiz</li>
</ul>
</div>
<div>
<ul>
<li>Foozle miz fiz</li>
<li>Jazzle marzle piz</li>
<li>Shtrackle beezle twiz</li>
</ul>
</div>
@EtienneLem
Copy link

Well done Mr. Back end! :P

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