Преглед изворни кода

changing h2.small.label to inline-block to keep it from spanning the entire width, and adding the clear:both to the :after css call

Garrick van Buren пре 12 година
родитељ
комит
0634fde536
2 измењених фајлова са 6 додато и 2 уклоњено
  1. 1 1
      assets/scripts/foreground.js
  2. 5 1
      assets/stylesheets/foreground.css

+ 1 - 1
assets/scripts/foreground.js

@@ -2,7 +2,7 @@ jQuery(document).ready(function() {
   jQuery(document).foundation();
   // Split the namespace title into a title and a label
   var $title = jQuery("h2:contains(':')").not(":contains('\"')").text().split(":");
-  jQuery("h2:contains(':')").not(":contains('\"')").html('<small class="label">' + $title[0] + '</small><div class="clear_both"></div>' + $title[1]);
+  jQuery("h2:contains(':')").not(":contains('\"')").html('<small class="label">' + $title[0] + '</small>' + $title[1]);
 
   // Turn categories into labels
   jQuery('#mw-normal-catlinks ul li a').addClass('label');

+ 5 - 1
assets/stylesheets/foreground.css

@@ -23,7 +23,11 @@ small {
 
 h2 small.label {
   font-size: small;
-  display:block;
+  display:inline-block;
+}
+
+h2 small.label:after {
+  clear:both;
 }
 
 .clear_both {