New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Quick coding question
Recently something changed that caused the footer on LowEndBox (on pages other than the home page) to be displayed improperly.
Example of the correct visual design on the home page: https://lowendbox.com
Not correct: https://lowendbox.com/blog/lowendboxtv-fire-up-wordpress-in-only-3-commands/
Can anyone help me understand what might be causing this?
Using archive.org it seems something changed a few days ago, but I have no memory of changing anything that would cause this change.
Any input from our local coding experts here would be appreciated
Thanked by 1visualwebtechnologies
Comments
You're missing a closing tag
</div>
before the<div id="footer"
.Unclosed
<div>
generally causes this. On quick look I suspect something with your ADS widget as they are in center on POST page while on home page they are "left-aligned" which may be causing mis-matched<div>
tags on down on page.I blame @raindog308
Obviously :-)
Thanks for the replies guys. Somehow I am still struggling to find the issue.
The footer code is this:
I don't remember editing the footer anytime in the past year. Could it be an issue in the index code?
This huge block of code is missing a closing div right before custom_html-2.
I used waybackmachine to check the previous code that worked and compared the two. This is the only thing that pops up.
Sent you a PM!
The individual blog pages are served by a different php (single-post.php) file than the home page (which is usually home.php) (Reference - https://i.stack.imgur.com/L036X.png) This could be what is causing the missing
</div>
A long shot, I see the css on the home page is different from the css on the blog page.. css is being served by the litespeed plugin. Maybe cleaning out the cache and trying it again?
So by adding another in the footer it seems to have fixed the issue.
Another question, any suggestions on how I can make the footer on LEB more responsive for mobile viewers?
^^ That's on desktop, which looks and works fine. However, on mobile, it's horrible.
Edit “@media” part in css if it’s exists
Edit “@media” part in css if it’s exists
Any suggestions on what here you would change?
First I would suggest to set correct width for footer banners🙈
Just set width: 100% for the div class and the issue should be fixed
I see this in the CSS:
And here is the footer code. What am I missing?
You're calling the same class (footimg) on both the parent and the child div.
Set the size of the image to display, probably defined in #bsap_xyz, like:
Max-width: 100%;
Display: block:
That should resize it to fit the parent.
Or... :
Width: inherit;
May work... On mobile atm so can't go though all code but that's first that comes to mind.
Doubt the image would still be readable once resized so better to use different ads for different screen sizes.
I would create a child div that fits the parent and define the ad as a background image for each @media size then use:
Background-size:contain:
To make it fit.
Change
} .footimg a img { width: 100% !important;}
to
} .footimg a img { max-width: 100% ;}
This will make the image 100% within the container footimg. This seems to scale down well and is always 100% of the screen width.
Regarding how to make the mobile experience better, it really depends on what you want to achieve. On the mobile view, the page seems to scroll down for ever. Things like the section "Virtual Private Server (VPS) Hosting FAQ" can be hidden from mobile.
So many Wordpress themes boast of "Mega Menus", the whole section of "Looking for Cheap VPS Hosting, Dedicated Servers and Web Hosting?" can also be put under a menu.
I changed it to:
And it doesn't seem to have had the intended impact. The footer is still way to wide for the view on mobile. Any other ideas? Am I doing something wrong?
just try the one I sent you
Worked perfectly, can't thank you enough!
Thanks to everyone who has helped so far!