Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mobile Chrome Browser CSS problems - text and spacing

Featured Replies

Hi everyone,

 

I really hope someone will be able to help me! I am getting pretty frustrated with my website www. frodshamweb .co .uk which when published a couple of months ago, worked fine on iPhone, android browser and also Chrome mobile browser which is what I use on my HTC One X and of course on desktop browsers.

 

It seems now for some reason (may be something to do with the chrome update I did a couple of days back) that when looking at the website on an android, the text size is out of proportion and rather big. It overlaps the footer and is a real pain and makes the whole website unreadable!

 

On an iPhone is stays in proportion to the rest of the page and other text sizes and isn't responsive. When using Chrome on Android, the text rules the roost and has a mind of it's own.

 

I have attached screenshots, any help would be really really appreciated!

 

Thanks,

 

Jack

 

 

 

post-55989-0-64551100-1370007416_thumb.png

 

 

post-55989-0-74214400-1370007445_thumb.png

 

 

  • Author

Thanks Mteam, have you got any suggestions of ways to fix it?

You have div class lefttext and div class rightimage. They are both floating, which removes the height of the parent container.

You have already given the parent container a fixed height of 750px:

<div class="textcontent" style="height:750px;">

but in a mobile browser .textleft is taller than the parent element.

 

Here is more info on clearing floats - http://css-tricks.com/snippets/css/clear-fix/ and

http://www.quirksmode.org/css/clearing.html

  • Author

Thanks for your help! I will try your suggestion mteam but what would the height need changing to on the .testimoniallogo?

 

I understand the problem a bit more after your explanation teodora, thank you for that!

 

So just to clarify, do I need to add a clear:both to the parent container like below and this will solve the problem for all the normal pages?

 

<div class="textcontent" style="height:750px;" div style="clear: both"> 

Then if I add clear:both to the css for .road and .footer the problem will be solved on the homepage?

 

This is very frustrating! Thanks for your help!:)

 

 

Jack

I think it might be best to use the clearfix method for that one, because you need to clear the children of .textcontent

 

Add this to your CSS:

.clearfix:after {
	visibility: hidden;
	display: block;
	font-size: 0;
	content: " ";
	clear: both;
	height: 0;
	}
* html .clearfix             { zoom: 1; } /* IE6 */
*:first-child+html .clearfix { zoom: 1; } /* IE7 */

Then add class .clearfix to .textcontent:

 

<div class="textcontent clearfix"> 

You need to remove the fixed height of 750px, to allow .textcontent to expand vertically if needed.

 

Hope that works for you :)

  • Author

Thanks for your suggestion Teodora but after trying it on the webhosting page of my site the same problem still occurs. Will using a 'sticky footer' work?

 

Then I just need to find a way to fix the homepage!

  • Author

If I remove height:750px will this fix the problem completely? I did remove height:750 from www. frodshamweb .co.uk/webhosting and also added class="clearfix" but it still hasn't solved the problem :(

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.