Centering content - parent and child div tags |
Centering content - parent and child div tags |
Lee Batchelor |
Apr 28 2021, 10:26 AM
Post
#1
|
Member Group: Members Posts: 82 Joined: 10-May 20 Member No.: 27,332 |
Hi all,
I have a parent div tag in which there is a child div tag centered. Everything is correctly centered on the page when viewed on my PC. When I open the same page on my Android, the alignments are off. The site in question is a genealogy website. If some of you want to see what I mean, here is the link: https://www.alivingpast.ca/indexdiv.htm My CSS code is as follows: .maindiv {position: relative; margin-left: auto; margin-right: auto; width: 950px;} .intro {margin: 0 auto; height: 140px; padding: 40px; background-color: #ffffff;} .leftdiv {margin: 0 auto; background-color: #ffffff; padding-left: 40px; padding-right: 40px; padding-top: 0px;} In this case, the .maindiv is the parent and .intro and .leftdiv are identical child div tags with slightly different other settings. Hopefully, I've provided enough information. Thanks! |
pandy |
Apr 28 2021, 10:41 AM
Post
#2
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
I don't see any problem on my Android. Checked with FF and Chrome. What browser did you use?
|
Lee Batchelor |
Apr 28 2021, 11:32 AM
Post
#3
|
Member Group: Members Posts: 82 Joined: 10-May 20 Member No.: 27,332 |
Thanks for checking, Pandy. You're right! I was opening the site from the Internet icon on my Android. The icon looks like a white Saturn planet with a blue background. I have no idea what internet browser that is. When I open it in Chrome, it works fine as you described. So, my code must be okay?
Thanks again... - Lee Edit The browser to which I refer is the Samsung Internet Browser. It has a 4/5 rating but that means nothing when it can't parse perfectly written code. Some of the reviews have mentioned that it works best on Samsung phones. To me, it's junk. I'll stick with Chrome. This post has been edited by Lee Batchelor: Apr 28 2021, 11:44 AM |
pandy |
Apr 28 2021, 01:32 PM
Post
#4
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Yeah, I have had a browser called just Internet on my previous phones. The last was a Samsung and the one before that a HTC. My current phone just had Chrome. But it's a Moto and they are known for not layering their own stuff on top of Android. I don't know if all brands call their own browser version Internet or if it's all the same browser... Darn hard to google "internet browser".
I think you are fine. People using the Samsung Internet thing still can read, I assume? It's also darn hard to test things on mobile since everything needs to be uploaded to a server. |
Lo-Fi Version | Time is now: 24th April 2024 - 05:07 AM |