#8666 closed defect (bug) (wontfix)
Override banner design in buddypress.org home page for the mobile devices.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | BuddyPress.org Sites | Priority: | normal |
Severity: | normal | Version: | |
Component: | BuddyPress.org Sites | Keywords: | needs-design-feedback has-patch |
Cc: |
Description
I have tested buddypress.org home page and which I have found some sections design override on the home page for only mobile devices. See below the attached screenshot for a better understanding.
Attachments (2)
Change History (6)
#4
@
4 months ago
To address the issue of the banner design overriding on the BuddyPress.org homepage for mobile devices, an additional solution can be proposed as follows:
Solution: Implement a Responsive Banner Redesign
Instead of hiding the banner image, we can optimize the image and layout for responsiveness to maintain visual consistency across all devices.
Steps:
- Use a Responsive Image:
- Replace the current banner image with a responsive image using the
srcset
attribute in the<img>
tag. This allows the browser to select the appropriate image size based on the device's resolution and screen size.`html <img src="banner-small.jpg"
- Replace the current banner image with a responsive image using the
srcset="banner-small.jpg 480w, banner-medium.jpg 768w, banner-large.jpg 1200w"
sizes="(max-width: 480px) 100vw, (max-width: 768px) 80vw, 1200px"
alt="Banner">
`
- Implement CSS Media Queries:
- Adjust the banner's layout and dimensions using CSS media queries to ensure proper scaling and alignment on mobile devices.
`css @media (max-width: 768px) {
- Adjust the banner's layout and dimensions using CSS media queries to ensure proper scaling and alignment on mobile devices.
.banner-section {
padding: 10px;
text-align: center;
}
.banner-section img {
max-width: 100%;
height: auto;
}
}
`
- Reorganize Banner Content:
- For smaller devices, reorganize the content in the banner (such as headings, buttons, or descriptions) to stack vertically and center-align them for better readability and accessibility.
`css @media (max-width: 768px) {
- For smaller devices, reorganize the content in the banner (such as headings, buttons, or descriptions) to stack vertically and center-align them for better readability and accessibility.
.banner-content {
display: flex;
flex-direction: column;
align-items: center;
}
}
`
- Lazy Loading for Performance:
- Add the
loading="lazy"
attribute to the image tag to improve page load time on mobile devices.
- Add the
- Testing and Optimization:
- Use browser developer tools to test the changes on various device resolutions.
- Optimize images with a tool like TinyPNG or ImageOptim for faster loading.
By redesigning the banner for responsiveness rather than hiding it, the solution ensures a visually appealing experience while maintaining the integrity of the design across all devices.
Image used in the headline section is not responsive so we have to hide it and add css for responsive design.