Fix tiles overflowing if width > columns

This commit is contained in:
Skylar Ittner 2017-12-02 01:11:02 -07:00
parent 88f11ab935
commit f29b8c3db2
2 changed files with 5 additions and 1 deletions

View File

@ -35,7 +35,7 @@ if (defined("EDIT_MODE") && EDIT_MODE == true) {
<?php $pagesize = $database->get("page_sizes", ["sizewidth (width)", "sizeheight (height)"], ["sizeid" => $pubdata["page_size"]]); ?>
.pub-content {
max-width: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["width"] : $pagesize["height"]); ?>;
min-height: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?>;
height: <?php echo ($pubdata["landscape"] == 0 ? $pagesize["height"] : $pagesize["width"]); ?>;
}
.page-safe-line .bottom {
@ -56,6 +56,9 @@ foreach ($styles as $style) {
}
foreach ($tiles as $tile) {
if ($tile["width"] > $pubdata["columns"]) {
$tile["width"] = $pubdata["columns"];
}
?>
#tile-<?php echo $tile["tileid"]; ?> {
order: <?php echo $tile["order"]; ?>;

View File

@ -12,6 +12,7 @@
margin: 0px auto;
box-shadow: 5px 5px 15px -3px rgba(0,0,0,0.75);
margin-bottom: 20px;
overflow: auto;
}
.page-safe-line div {