Printing modal still showing 'hidden' content - html

I am trying to print the contents of a modal but its showing big gaps in the print preview and things that should be hidden.
Despite adding hidden to particular things they still show up in the preview.
There is also a hidden div to prevent swiping on the map when scrolling which is why i thing th first page of the preview looks blank.
#media print {
#overlay, #close-modal-button, #print-button * {
visibility: hidden;
display: none !important;
}
#map-modal * {
visibility: visible;
}
#map-modal, #map-modal {
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
overflow: visible!important;
display: block;
}
}
<div id="map-modal" class="modal" materialize="modal" [materializeParams]="[{dismissible: true}]" [materializeActions]="modalActions">
<div id="map-modal-content" class="modal-content">
<h4 id="modal-title">Map of the area and directions</h4>
<div class="container center">
<div class="row">
<div id="overlay" class="overlay" onClick="style.pointerEvents='none'">
</div>
<div class="center">
<iframe id="map" class="center" src="https://www.google.com/maps/d/u/0/embed?mid=1T1AFckKqP4J38fIJswg8uEr42hyB3R5y&ll=51.06791175093598%2C0.21307320000005348&z=11" allowfullscreen></iframe>
</div>
</div>
<hr>
<p id="modal-text"><b>St Dunstan’s Church, Mayfield TN20 6AB</b><br>Mayfield village is signposted on the A267 and the church is situated in the middle of the village on the High Street.</p>
<div class="row">
<div class="container center">
<div class="col s12">
<img id="map-image" class="center materialboxed" src="./assets/Map1.png">
</div>
</div>
</div>
<p id="modal-text">The car park is sign posted on the right-hand side of the High Street as you are driving up the hill. The easiest way to get to the church from the car park is to walk through the car park for The Middle House as seen on the map. The marked car park in Mayfield is free.</p>
<hr>
<p id="modal-text">The drive from St Dunstan’s Church to the reception at Juddwood Farm is approximately 30 minutes.</p>
<p id="modal-text"><b>Juddwood Farm, Haysden Lane, Tonbridge TN11 8AB </b></p>
<div class="row">
<div class="overlay" onClick="style.pointerEvents='none'">
</div>
<iframe id="map" class="center" src="https://www.google.com/maps/d/u/0/embed?mid=1uReFxtB4ZhFSwVtD8vQ7L3qKpetdMElh&ll=51.096412867708054%2C0.240690000000086&z=11" allowfullscreen></iframe>
</div>
<div class="row">
<div class="container center">
<div class="col s12">
<img id="map-image" class="materialboxed" src="./assets/Map2.png">
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="container center">
<a id="print-button" onClick="window.print()" class="black waves-effect waves-light btn z-depth-3" href=""><i class="material-icons right">print</i>Print this page</a>
</div>
</div>
<div class="modal-footer transparent">
<a id="close-modal-button" class="right transparent btn-flat" (click)="closeModal()">Close</a>
</div>
</div>
I've googled around a fair amount but cant see why. Here is a gif of the print preview https://imgur.com/a/Hnfcr

It looks like your declaration #print-button * is looking for a child of #print-button, rather than #print-button itself.
Also, it's unclear why you have duplicated #map-modal, #map-modal { ... Did you intend to select #map-text ?

Related

How to align text on the right side of an image in the header

So, I am trying to get the body text inside the red box that I added in the image attached. It seems like no matter what I do, it just keeps moving down.
Here is the code:
<div class="catalog-center-width one-col-full">
<div class="top-row-grey top-row-white-v2 padding-top padding-side row-v2">
<div class="row dp-row-flex-v2">
<div class="columns large-6 text-center dp-promo-image-wrapper"><img src="https://everpath-course-content.s3-accelerate.amazonaws.com/instructor%2F3vkvwjz9hnng2dhlfwzj2a5lt%2Fpublic%2F1666809704%2F6527-q2retarget-hc.1666809704408.png" alt="" width="529" height="360" align="left" /></div>
<h1 class="break-word">
<strong>Get started with Ally Lending basics</strong>
</h1>
<div class="sj-course-info-wrapper">
<h2>Find and start conversations, collaborate effectively in channels, find information you need, keep work organized with channels and keep your sidebar organized in Slack.</h2>
<div id="purchase-button-wrapper-large" class="purchase-button-wrapper">
<a class="medium button purchase-button login-link free" href="/checkout/1ycnoni7kt1cn">
<span class="purchase-button-full-text"> Get Started </span>
</a>
</div>
</div>
</div>
</div>
</div>
<div id="purchase-button-wrapper-large" class="purchase-button-wrapper">
<div id="purchase-button-wrapper-large" class="purchase-button-wrapper">
<!-- START Walkthrough developer center tile design,
add to page source code -->
</div>
</div>
html,body,h1,h2,h3 {
padding:0;
margin:0;
}
.container {
width:100%;
max-width:80vw;
margin:0 auto;
display:flex;
align-items:center;
justify-content:center;
gap:4rem;
}
.left-col {
width:30%;
}
.left-col img {
width:100%;
height:auto;
}
.right-col {
display:flex;
flex-direction:column;
width:70%;
border:1px solid red;
padding:2rem;
}
<div class="container">
<div class="left-col">
<img src="https://everpath-course-content.s3-accelerate.amazonaws.com/instructor%2F3vkvwjz9hnng2dhlfwzj2a5lt%2Fpublic%2F1666809704%2F6527-q2retarget-hc.1666809704408.png" alt="" width="529" height="360" align="left" />
</div>
<div class="right-col">
<h1 class="break-word"><strong>Get started with Ally Lending basics</strong></h1>
<h2>Find and start conversations, collaborate effectively in channels, find information you need, keep work organized with channels and keep your sidebar organized in Slack.</h2>
<div id="purchase-button-wrapper-large" class="purchase-button-wrapper">
<a class="medium button purchase-button login-link free" href="/checkout/1ycnoni7kt1cn"><span class="purchase-button-full-text"> Get Started </span>
</a>
</div>
</div>
</div>
<div id="purchase-button-wrapper-large" class="purchase-button-wrapper">
<div id="purchase-button-wrapper-large" class="purchase-button-wrapper">
<!-- START Walkthrough developer center tile design,
add to page source code -->
</div>
</div>

Css alignment image overlap

Can any one help me to fix the image overlap.
Please is the HTML bootstrap card:
<div style="margin-top: 10px;">
<div class="container">
<div class="card-columns">
<div *ngFor="let issues of IssuesList">
<div class="card-deck">
<div class="card">
<div>
<img src="assets/img/icons8-verified-account-64.png" class="verified">
</div>
<img class="card-img-top"
src="https://s3.eu-central-1.amazonaws.com/bootstrapbaymisc/blog/24_days_bootstrap/madrid.jpg" alt="Madrid">
<div class="card-body">
<h4 class="card-title">Madrid</h4>
<h6 class="card-subtitle mb-2">Spain</h6>
<p class="card-text">Madrid is home to two world-famous football clubs, Real Madrid and Atlético de Madrid.
Due to its economic output, high standard of living, and market size, Madrid is considered the major
financial centre of Southern Europe.</p>
See Gallery
</div>
<div class="card-footer">
<small class="text-muted">Last updated 5 days ago</small>
</div>
</div>
</div>
</div>
Css style:
.verified
{
position:absolute;
top: -20px;
left: -20px;
z-index: 2;
width:20%;
}
Output:
If you are talking about your badge not being visible whole time it is because there is no place left on top of the screen for them to be shown. To fix this push your .card down with .margin-top
.card {
margin-top: 50px;
}
Modify this value as you want to achieve desired look. If badges where not the problem come back so we can fix it

Aligning divs using #media

I have some boxes which are perfectly aligned in every way except they are different heights. I'd like the heights all the same. They align at the bottom, on the sides, with the edge of the page, but at the top they're all different heights. I'm happy with the layout, 3 x3 but how to get the heights all the same size.
Page: https://adsler.co.uk/find-an-event/
#media (min-width: 768px) {
.box-layout {
max-height: 100%;
}
}
<div class="line-layout" style="display: none;">
<li class="event_listing post-6985
type-event_listing status-expired
hentry" style="visibility:
visible;" data-latitude="" data- longitude="">
<div class="event-info-row-
listing">
<a href="https://adsler.co.uk/
event/new-cross-and-deptford-free-
film-festival/">
<div class="row">
<div class="col-
md-1">
<div class="organizer-logo">
<img alt="Deptford Film Festival" src="https://adsler.co.uk/wp-
content/uploads/event-manager-
uploads/event_banner/2019/05/2
456d41f16399aed538d25b1cd32ad1
4.jpg">
</div>
</div>
<div class="col-md-4">
<div class="event-title">
<h4>New Cross and Deptford Free Film Festival</h4>
<div class="boxes-view-
listing-
registered-code">
</div>
<div class="event-
organizer-
name">
<normal>Deptford Film Festival
<normal></normal>
</normal>
</div>
</div>
<div class="col-md-2">
<div class="date" <date>2019-05- 26
</date>
</div>
</div>
<div class="col-md-3">
<div class="event-
location"><i class="glyphicon
glyphicon-map-
marker"></i> London </div>
</div>
<div class="col-md-2">
<div class="event
ticket">#free</div>
</div>
<div class="col-md-3"></div>
</div>
</a>
</div>
</li>
</div>
<!-- Box Layout -->
<a class="event_listing post-6985
type-event_listing status-expired
hentry" href="https://adsler.co.uk
/event/new-cross-and-deptford-free-
film-festival/">
<div class="box-layout">
<div class="event-img"><img alt="Deptford Film Festival" src="https://adsler.co.uk/wp-
content/uploads/event-manager-
uploads/event_banner/2019/05/2
456d41f16399aed538d25b1cd32
ad14.jpg"></div>
<div class="boxes-view-box-
registered-code">
</div>
<div class="event-title">
New Cross and Deptford Free Film Festival
</div>
<div class="event-start-
date">2019- 05-26
</div>
<div class="event-location">
<i class="glyphicon glyphicon-
map-marker"></i> London </div>
<div class="box-footer">
<div class="event-
ticket">#free</div>
</div>
</div>
</a>
Didn't work.
The problem is with your img tag.
Your images are different heights so that you are having different heights of each box.
You have 2 choices:
1- make all images with same width and height(not that easy)
2- you should fix img height, try something like:
#content .entry-summary img.wp-post-image, #content .entry-content img {
height: 250px;
}
.box-layout {
width: 100%
}
this should work as you want.
note that will be some margin on the left and right of each image because of different dimensions.
screenshot after editing as above:
The heights of your boxes are being determined by the size of the images. Luckily, your images are wrapped in a containing div with the class event-img. So, instead of resizing all your images, you could simply give .event-img a max-height of shorter than any of your images, and set it's overflow: hidden
.event-img {
max-height: 190px;
overflow: hidden;
}

How do I center 2 divs in HTML Bootstrap?

As the title says, how do I center two divs next to each other perfectly?
My HTML: (or well, a bit of it)
<section class="team" id="team">
<div class="container">
<h3>The team behind CatCraft</h3>
<div class="divider">
<div class="hr">
<div class="hr-dot"></div>
</div>
</div>
<div class="row row-centered">
<div class="team-centered col-md-4">
<img src="http://cravatar.eu/helmhead/6a940db5e02d4bf79db9203a8b126f0d/140.png" alt="catx">
<h4 class="bold">CatX (Owner)</h4>
<p>Hi! I'm CatX and I'm the owner of CatCraft. I like anime and tech stuff. My favourite server is bending. =^_^=</p>
</div>
<div class="team-centered col-md-4">
<img src="http://cravatar.eu/helmhead/ef4fbdb6d629480d8f98ed9919c111e9/140.png" alt="__ast__">
<h4 class="bold">__Ast__ (Co-Owner)</h4>
<p>Example text, pls write something ;-;</p>
</div>
</div>
</div>
</section>
My CSS: (same here, this isn't all)
I tried to make a box for the css above too but it didn't work. http://pastebin.com/SzhAmh3f
Basically the problem I'm having is that the code above works kind of but one of the blocks are a little bit lower than the other and i have no idea why.
Yes, I know that there are other posts about this subject but no one worked for me so I decided to open my own.
There are a lot of unwanted styles actually to achieve this, you simply need the below code on your team-centered class. Remove row-centered class. It should look like this
CSS
.team img {
width: 140px;
height: 140px;
border-radius: 50%;
margin: 10px auto 40px;
}
.team-centered {
width: 50%;
float:left;
text-align: center;
}
HTML
<section class="team" id="team">
<div class="container">
<h3>The team behind CatCraft</h3>
<div class="divider">
<div class="hr">
<div class="hr-dot"></div>
</div>
</div>
<div class="row">
<div class="team-centered">
<img src="http://cravatar.eu/helmhead/6a940db5e02d4bf79db9203a8b126f0d/140.png" alt="catx">
<h4 class="bold">CatX (Owner)</h4>
<p>Hi! I'm CatX and I'm the owner of CatCraft. I like anime and tech stuff. My favourite server is bending. =^_^=</p>
</div>
<div class="team-centered">
<img src="http://cravatar.eu/helmhead/ef4fbdb6d629480d8f98ed9919c111e9/140.png" alt="__ast__">
<h4 class="bold">__Ast__ (Co-Owner)</h4>
<p>Example text, pls write something ;-;</p>
</div>
</div>
</div>
</section>

Always get the same position of readmore link in dynamic content div

I got a couple of divs that load content in them, but every content is different, and the read more link at the bottom is pushed along with the content.
How can I get the link to stick to the bottom of the div?
Example:
The html code of one box:
<div class="vertical-item gallery-extended-item with_background text-center" style="height: 330px;">
<div class="item-media">
<div class="media-links">
<a class="abs-link" title="" href="nieuwsbericht-5.html"></a>
</div>
</div>
<div class="item-content">
<h3 class="item-title">
Project test
</h3>
<span class="categories-links">
<a rel="category" href="#" class="theme_button small_button color1">Nieuws</a>
</span>
<br>
<p>Project test opgeleverd - februari 2016</p>
<p>
Lees verder
</p>
</div>
</div>
Use absolute position on the link, he will stay at the same place every time, no matter how long the text above is.
See it here
.bottom { position: absolute; bottom : 100px; left: 0; right: 0; }
Try position:absolute, along with bottom, this will place the element from bottom 20px up.
Below is the updated code <a class="sbottom" href="nieuwsbericht-5.html">Lees verder</a>.
.sbottom {
position: absolute;
bottom: 20px;
}
<div class="vertical-item gallery-extended-item with_background text-center" style="height: 330px;">
<div class="item-media">
<div class="media-links">
<a class="abs-link" title="" href="nieuwsbericht-5.html"></a>
</div>
</div>
<div class="item-content">
<h3 class="item-title">
Project test
</h3>
<span class="categories-links">
<a rel="category" href="#" class="theme_button small_button color1">Nieuws</a>
</span>
<br>
<p>Project test opgeleverd - februari 2016</p>
<p>
<a class="sbottom" href="nieuwsbericht-5.html">Lees verder</a>
</p>
</div>
</div>