Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <dl class="accordion">
<dt><a>Drama, Music and Screen <span>more details
»</span></a></dt>
<dd style="display: none;" class="">
  <p><img alt="Sarah Jane Dickenson" title="Sarah Jane Dickenson" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-drama_helen_v_150sq.jpg" class="">The School of Drama, Music and
Screen&nbsp;at the University of Hull is committed to providing a
student experience which is second to none, students have the
opportunity to develop both practical skills and intellectual
understanding to a very high level. Our graduates often go on to
become highly-regarded professionals in the cultural industries, in
education and in related professions.<br></p>
<p><br>
<a class="button" href="/fass/drama-1.aspx">Drama Website</a>&nbsp;
&nbsp;<a class="button" href="/fass/music-1.aspx">Music Website</a>&nbsp;
&nbsp;<a class="button" href="https://www2.hull.ac.uk/fass/film-studies.aspx">Film
Studies</a></p>
</dd>
<dt><a>English<span>more details »</span></a></dt>
<dd style="display: block;" class="active">
<p><img alt="Module information" title="Module information" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-module_logo_v_150sq.jpg" class="">Hull's Department of English has reason to be
proud of its reputation. In the last Research Assessment Exercise
of 2008 ninety per cent of our research in the English submission
was awarded an international profile, and 55% of our submission
was&nbsp;ranked in the&nbsp;top two&nbsp;categories of
'internationally excellent' and 'world class'</p>
<p><br>
<a class="button" title="Visit the English Website" href="/fass/department_of_english.aspx">English Website</a></p>
</dd>
<dt><a>History<span>more details »</span></a></dt>
<dd style="display: none;">
<p><img alt="Family tree scroll" title="Family tree scroll" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-history_home2_v_150sq.jpg" class="">If you are interested in studying history
across a wide range of topics and periods, in small groups with
enthusiastic teachers, then the Department of History is the place
for you. Our 30 members of staff are active historians working on
everything from ancient Rome to modern Britain</p>
<p><br>
<a class="button" title="Visit the History website" href="https://www2.hull.ac.uk/fass/department-of-history.aspx">History Website</a></p>
</dd>
<dt><a>The Law School<span>more details »</span></a></dt>
<dd style="display: none;">
<p><img alt="MA in International Law and Politics" title="MA in International Law and Politics" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-law_mallet_large_v_150sq.jpg" class="">The Law School is the longest
established department within the University of Hull, which started
life as the University College, Hull. The Law School was
established in October 1927 with an initial intake of fourteen
students preparing for their professional examinations.</p>
<p><br>
<a class="button" title="Visit the Law School Website" href="https://www2.hull.ac.uk/fass/law-school.aspx">Law School Website</a></p>
</dd>
<dt><a>Languages, Linguistics and Cultures<span>more details
»</span></a></dt>
<dd style="display: none;">
<p><img alt="flags" title="flags" src="https://www2.hull.ac.uk/fass/images/hu-languages100421036_v_150sq.jpg" class="">The Department offers different types of Single Honours and
Joint Honours Programmes, which combine language study with modules
in social and political history, literature, film, drama, art and
other options. All programmes include a year abroad except our BA
in Modern Languages.</p>
<p><br>
<a class="button" title="Visit Languages" href="/fass/school-of-languages,-linguisti.aspx">Languages Website</a>&nbsp; &nbsp;<a class="button" title="Visit American Studies" href="https://www2.hull.ac.uk/fass/american-studies.aspx">American
Studies Website</a></p>
</dd>
<dt><a>Politics, Philosophy and International Studies<span>more
details »</span></a></dt>
<dd style="display: none;">
<p><img alt="ME MAP" title="ME MAP" src="https://www2.hull.ac.uk/fass/images/me%20map_v_150sq.jpg" class="">Independent surveys show that the Department of Politics
and International Studies is one of the finest in the UK. Its
student centred approach, range of courses, staff expertise and
employer networks combine to make it a student destination which is
second to none. In 2010, the Times Good University Guide ranked the
department 11th out of 69.</p>
<p><br>
<a class="button" title="Visit the Politics Website" href="https://www2.hull.ac.uk/fass/politics-and-international-stu.aspx">Politics Website</a>&nbsp; &nbsp;<a class="button" title="Visit the Philosophy Website" href="https://www2.hull.ac.uk/fass/philosophy.aspx">Philosophy
Website</a></p>
</dd>
<dt><a>Social Sciences<span>more details »</span></a></dt>
<dd style="display: none;">
<p><img alt="Keyboard with Gender Keys" title="Keyboard with Gender Keys" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-genderkeys_v_150sq.jpg" class="">We are a multidisciplinary Department of
Social Sciences with a distinctive profile of teaching and research
that brings together a world class staff with expertise in
Anthropology, Criminology, Gender Studies, Social Policy &amp;
Social Justice, Sociology,&nbsp;Media&nbsp;and Social Work.</p>
<p><br>
<a class="button" title="Visit the Social Sciences Website" href="https://www2.hull.ac.uk/fass/social-sciences.aspx">Social Sciences Website</a>&nbsp; &nbsp; <a class="button" title="Visit Religion" href="https://www2.hull.ac.uk/fass/religion.aspx">Religion
Website</a></p>
</dd>
<dt><a>Scarborough School of Arts and New Media<span>more details
»</span></a></dt>
<dd style="display: none;">
<p><img alt="Drama and English" title="Drama and English" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-drama_english_v_150sq.jpg" class="">The School of Arts and New Media (SANM), based
at the Scarborough Campus, encourages students to explore and
contribute to the future of computing and digital media through a
range of undergraduate and postgraduate opportunities</p>
<p><br>
<a class="button" title="Vist the SANM Website" href="/fass/fass/departments/sanm.aspx">School of Arts and New Media Website</a></p>
</dd>
<dt><a>Part-time Provision Office<span>more details
»</span></a></dt>
<dd style="display: none;">
<p><img alt="Andrea Parker, part-time LLB student" title="Andrea Parker, part-time LLB student" src="https://www2.hull.ac.uk/fass/images/2013627.00-18.009.0030.00-parker_a_med_v_150sq.jpg" class="">The Part-time Provision Office is a friendly
and informal unit that works hard to forge close links with its
students. It is not part of a conventional department and exists
purely to offer a range of programmes tailored for open-access
part-time students. The programmes offer a variety of interesting
pathways for local students who wish to study part-time while
working</p>
<p><br>
<a class="button" href="/fass/faculty_of_arts__social_scien/part-time_provision_office.aspx">Part-time provision
Website</a></p>
</dd>
</dl>
              
            
!

CSS

              
                body {
  padding: 50px;
  font-family: "arial";
  font-size: 13px;
  line-height: 1.6;
}
a {
   color: #a22; 
}
a.button {
  color: #fff;
  background: #a22;
  padding: 8px 15px;
  border-radius: 3px;
  text-decoration: none;
}
dl {
  margin-bottom: 15px;
  width: 95%;
}
dd {
  width: 100%;
  padding: 15px;
  margin-bottom: -1px;
  border: 1px solid #ccc;
  border-top: none;
  float: left;
  background: #fff;
  border-radius: 0 0 3px 3px;
}
dd img {
  float: right;
  margin: 3px 3px 3px 15px;
  box-shadow: 0px 0px 5px #ccc;
  padding: 7px
}
dt a {
  display: inline-block;
  cursor: pointer;
  width: 100%;
  border: 1px solid #ccc;
  background: url(https://www2.hull.ac.uk/fass/Files/BG-deptdt.gif) 0 0 repeat-x;
  margin-bottom: -1px;
  padding: 10px 15px;
  text-decoration: none!important;
}
dt a:hover,
dt a:focus {
  background: #eee;
}
a.deptLink {
  float: right;
  width: 201px; /* width of image */
  padding:1px;
  border: 1px solid #ccc;
  margin: 2px 0 10px 10px;
  text-align: center;
  text-decoration: none;
}
a.deptLink:hover,
a.deptLink:focus {
  border-color: #A02720;
}
dt span {
  float: right;
  color: #888;
  text-shadow: 1px 1px 1px #fff;
  font-size:90%;
}
              
            
!

JS

              
                $(document) .ready(function($) {   
		  var allPanels = $('.accordion > dd').hide();    
		  $('.accordion > dt > a').click(function() {
		      $this = $(this);
		      $target =  $this.parent().next();
		      if(!$target.hasClass('active')){
		         allPanels.removeClass('active').slideUp();
		         $target.addClass('active').slideDown();
		      }
		    return false;
		  });
		})(jQuery);
              
            
!
999px

Console