Meine Flugblatt-Map deckt den Titel der Karte ab, die genau über der Karte sein soll. Ich verwende CSS und Bootstrap, um Seitenelemente auszurichten. Siehe das Bild: Hier ist der Code:Alignment-Problem mit CSS und Bootstrap
<style type="text/css">
body, html {
height: 100%;
margin: 0;
padding: 0;
}
div {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
img {
width:97%; /* you can use % */
height: auto;
}
div#location {
width:600px;
height:400px;
}
div#datatable {height:700px; overflow-y:scroll; width: 425px word-wrap: break-word;}
td.dc-table-label {display:none;}
span.dc-data-count {font-size:.5em;}
span.dc-data-count {font-weight: normal;}
table#media-table {
background-color: black;
color:white;
padding: 0;
}
<div class="container" style="padding-top:20px">
<h2 class="page-title">Ivan Doig Archive Explorer <span class="dc-data-count">Showing <span class="filter-count"></span> of <span class="total-count"></span> photographs {<a href="javascript:dc.filterAll(); dc.renderAll();">reset</a>}</span>
</h2>
<div class="row">
<div class="col-md-4">
<strong><span id="datatable"></span>Media</strong>
<table class="table table-hover" id="media-table"></table>
</div>
<div class="col-md-6" id="location">
<strong><span id="map"></span>Location</strong>
</div>
</div>
Verweise auf die Datentabelle und der Karte sind wie folgt:
var map = dc.leafletMarkerChart("#location", groupname)
var dataTable = dc.dataTable("#media-table", groupname)
Die Karte soll sich an die Spitze des "Filmstreifens" zu setzen und es hat den Titel "Ort" wie "Medien". Dies ermöglicht das Hinzufügen von Statistikzusammenfassungen am oberen Rand jedes Elements.
Versuchen Sie es mit 'margin-top' nach unten zu verschieben. – TricksfortheWeb
Ich habe gerade versucht, hinzuzufügen: 'div # location { Rand oben: 20; Breite: 600px; Höhe: 400px; } 'und hatte das gleiche Ergebnis. – mutanthumb
Wo soll der Titel sein? – TricksfortheWeb