Increase Title Margin in Mobile view only - html

Everything looks great on desktop. But in the mobile view I'm seeing blog titles overlapping the blog teasers on my blog page. I am trying to add margins to the bottom of the blog post titles for the mobile view only:
I've tried adding this css:
#media all and (max-width: 1000px) and (min-width: 700px) { .entry-container .entry-title { margin-bottom:15px; }}
but that doesn't seem to do anything.
Here is a copy of the div with its classes:
<div class="entry-container"><header class="entry-header"><h2 class="entry-title"><a class="entry-title-link" rel="bookmark" href="https://avt.850.myftpupload.com/why-we-became-financial-advisors/">Why We Became Financial Advisors</a></h2>
</header><div class="entry-content"><p>Would you hand over your house keys to a stranger? That’s often what it feels like to work with a financial advisor. Not only do …</p><p class="more-link-wrap">Continue Reading <span class="screen-reader-text">about Why We Became Financial Advisors</span></p></div><footer class="entry-footer"><div class="alignleft"><img alt="" src="https://secure.gravatar.com/avatar/895fdbf242e920205673491b0b5b2b80?s=46&d=mm&r=g" srcset="https://secure.gravatar.com/avatar/895fdbf242e920205673491b0b5b2b80?s=92&d=mm&r=g 2x" class="avatar avatar-46 photo" height="46" width="46" loading="lazy"></div><p class="entry-meta"><span class="entry-author">Written by:<br><span class="entry-author-name">Kourtney Kearney</span></span><span class="entry-date"><time class="entry-time">Published on:<br><span class="entry-time-date">September 2, 2021</span></time></span> <span class="entry-comments-link">Thoughts:<br>No comments yet</span></p></footer></div>

Just review the provided Test link, the issue is not related to Title or Responsive.
Actually margin-top: -60px!important; CSS added on .entry-content and margin-bottom: 65px; CSS on .entry-header.
Step 1:
Remove margin-top: -60px!important; CSS from .entry-content.
Step 2:
Change margin-bottom: 65px; CSS to margin-bottom: 0; on .entry-header.
Will resolve your issue on Both Desktop and Responsive versions. Thank You

There are couple of things you can check:
min-width: 700px to max-width: 1000px is not mobile view. It is usually tablet size. So if you're checking on smaller screen sizes, your CSS might not get applied.
As you can see in the snippet you pasted, normal divs will be positioned correctly one after the other without an overlap even when there is no margin set. So check if you've have a height set on .entry-container, .entry-header, .entry-title h2.entry-title. This is probably causing the header to overflow and thus overlap on the content below.

Related

How to make links clickable in Bootstrap via mobile?

I have a website that works fine normally but when in mobile mode, all the links (with exception of the navigation) are no longer clickable. Does anybody know how to change this? I'm not too familiar with Bootstrap though I've tried to troubleshoot as much as I can.
Here's the website: http://dominiquehall.com/dom/
Thank you in advance if anybody can help.
Remove the following code from your theme css file (agency.min.css) at line 477:
div {
height: 100%;
}
Or you can override that property by adding the following code in your custom css file:
div{
height: auto !important;
}
The problem in your code is with the property of div having height 100%, thus overlaying all the links. The div containing the image of a person playing guitar is covering the links in mobile mode. The images are hidden but the div still exist.
Another hack is hiding that particular div in mobile mode.
#media screen and (max-width:991px)
{
.target_div{
display: none:
}
}
In your case the target div is:
<div class="col-lg-4 col-md-5">
<div class="fixed">
<img src="./img/dom1.jpg" id="photo" class="hidden-sm hidden-xs" alt="">
View Resume
Equipment List
</div>
</div>
Just add a class name to the above div and a display as none for mobile devices and your site is good to go.

Vertical Alignment

I am trying to align my "cards" vertically when viewed from a mobile phone however I cannot seem to get the syntax right. I tried to 'text-align: center;' float:none' among other tries but I can't seem to figure it out. Any help will be appreciated. thank you.
/* Extra small devices (portrait phones, less than 576px) */
#media (max-width: 575px) {
.card {
display: block;
float: none;
width: 100%;
text-align: center;
}
}
<div class="card">
<img src="img/websume.png" height="240" width="356" alt="Card image cap">
<p class="card-text">My "Web-sume" was my first site to include Bootstrap 4. The site is a responsive site, with a feature only available to moblie devises. The site consist of mostly Bootstrap custom layouts.</p>
</div>
<div class="card">
<img src="img/websume_drpdwn.png" height="240" width="356" alt="Card image cap">
<p class="card-text">The "Web-sume" has several fixed images as well as a drop down section which includes my address as well as social links. I used the -web kit layouts for the 'Experience' section of the site.</p>
</div>
<div class="card">
<img src="img/websume_exp.png" height="240" width="356" alt="Card image cap">
<p class="card-text">As mentioned before, the site, when viewed through a mobile devise has a feature where if a client wants to get in contact with me they do not have to scroll all the way to the bottom of the page to get my contact information, a 'email' and 'phone' button appears for easy access.</p>
</div>
Just a simple oversight - it's the CSS comment breaking your #media query. You used // Extra small devices (portrait phones, less than 576px) initially, and in CSS, the comment syntax is /* Extra small devices (portrait phones, less than 576px) */
If I understand the problem correctly, your cards are going off the edge of the screen. This is due to the fact that while you're setting the width of .card to 100% for mobiles, you're hard-coding in the widths of the images, and not actually forcing the images to be contained within the bounds of their respective .card containers.
The best way to correct this is to specify a max width for all images:
img {
max-width: 100%;
}
Note that you'll probably also want to set height: auto, to make sure that the images don't get squashed:
#media (max-width: 575px) {
img {
height: auto;
}
}
I've created a fiddle showcasing this here.
Hope this helps! :)

positioning of Google Captcha works fine on desktop / tablet, but not on mobile

I have the following HTML :
<div class="form-group" style="margin-left: 7%;" id="gCaptcha">
#Html.Recaptcha("MyKey", CaptchaTheme.Dark)
#Html.ValidationMessage("ReCaptcha")
</div>
As you can see I have specified margin-left:7% reason behind this is because I want it to appear in the middle instead of floating to the left as shown here:
this works fine on desktop / tablets but when viewed on a mobile device its pushed further to the right because of the margin-left:7% i have specified, now to fix this I assumed I could of put margin-left:auto; margin-right:auto but that doesn't do anything, can anyone suggest a way that will make this captcha appear in the middle for all devices?
Hello there try this in your #media for phones:
Important inline-styles will overwrite any other css
remove style="margin-left: 7%;"
#gCaptcha{
margin: 0 auto;
width: 85%;
}
If this doesn't work please provide the CSS for .form-group

How to get rid of spaces on mobile version

Currently in my style.css file I am using certain designs only for the mobile version of my website.
Here is the beginning tag:
#media only screen and (min-width : 150px) and (max-width : 780px)
I want to be able to set it up so that when the site is on a mobile device it does not use the &nbsp that is shown below, I want to only use &nbsp in the full desktop. Is there a way to handle this in a css file?
<td colspan="2" style="font-size: 16pt;">
Home
All Products
</td>
If you want to use CSS for that. Then on the desktop site you would have to write the HTML as this
<td colspan="2" style="font-size: 16pt;">
Home
All Products
</td>
cannot be removed dynamically using CSS. JavaScript can handle these events, but CSS is not designed to handle this.
This way you can control the space between the elements using CSS. Now in the media style, you can remove this margin.
#media only screen and (min-width : 150px) and (max-width : 780px) {
td a:nth-child(2) {
/* second a */
margin-left: 0;
}
}
I think there are two possible solutions:
Use margins instead of since the non-breaking space is protected and cannot be removed via CSS. You could apply margin:0 3%; or something alike to the anchors.
Wrap that s by a span: <span class="spacer"> </span> and apply display:none when on mobile.

CSS/HTML - Hide images on mobile phone and use an alternate text

I currently have a page that generates a table from an SQL database using PHP, including one column that contains images. Due to us now having to work on a mobile platform, I'm looking for a way to hide the images. I'm currently using display: none on an antiscreen.css file, but as the images are links, it doesn't show the links
For clarity, when the image is on a PC browser it appears like this:
<td>
<a href="link to image source:>
<img height=80 alt='Text I want to display' src="link to image source" />
</a>
</td>
And when on a mobile the image, link and text are hidden using the display:none method.
So how would you recommend I work this out?
I would probably do this:
<td>
<a href="link to image source:>
<img height=80 alt='Text I want to display' src="link to image source" />
<span class="mobileonly" src="link to image source">Text I want to display</span>
</a>
</td>
Then I would set span.mobileonly { display: none; } on the main stylesheet and span.mobileonly { display: inline; } in antiscreen.css. The advantage is that the mobile link will also be easy to style.
Another option, which works for all screen sizes under a certain nr. of pixels is to use a media query, basically similar to the above one but with the advantage that it works on any screen size smaller than the defined number of pixels.
/* Media Query for mobile */
#media screen and (max-width: 480px) {
/* This resizes tables and images to be 100% wide with a proportionate width */
/* Hide stuff on mobiles */
table[class=emailnomob],td[class=emailnomob],img[class=emailnomob],span[class=emailnomob]{display:none !important;}
/* Additional Media Query for tablets */
#media screen and (min-width: 480px) and (max-width: 1024px) {
/* Hide stuff on tablets */
table[class=emailnomob],td[class=emailnomob],img[class=emailnomob],span[class=emailnomob]{display:none !important;}
This should covers both mobile and tablet devices.
Code courtesy of .net email tutorial. I only stripped the parts you don't need.
Usage:
<img class="emailnomob" height=80 alt="Text I want to display" src="link to image source" />