Ho do I autosize pages?

  • 0
  • 2
  • Question
  • Updated 5 years ago
  • Answered
Archived and Closed

This conversation is no longer open for comments or replies and is no longer visible to community members. The community moderator provided the following reason for archiving: We have archived this topic as it has either reached a resolution or has become inactive.  If you believe this topic should not have been archived, please let us know, and we would be happy to review it.  You may continue to access this topic as needed fo

Trying to get my pages to autosize to accommodate different screen and browsers.  Is this even possible with Homesite?
Photo of Hallie5940

Hallie5940

  • 80 Points 75 badge 2x thumb

Posted 5 years ago

  • 0
  • 2
Photo of William S

William S

  • 18,878 Points 10k badge 2x thumb
Hello,

This is called a responsive design website, and Homestead sites are not considered responsive. Our sites are fixed width.
Photo of George7467

George7467

  • 3,590 Points 3k badge 2x thumb
Instead of autosizing a page, Is it possible for Homestead users to add html code to their desktop-freindly pages that would detect if someone was attempting to access it with a mobile device and redirect them to a mobile-friendly page?
(Edited)
Photo of Drew N

Drew N, Alum

  • 262,826 Points 100k badge 2x thumb
If you have the code you need, then you can add it under page settings > advanced
Photo of George7467

George7467

  • 3,590 Points 3k badge 2x thumb
I don't have the code and haven't looked for it yet, but was just wondering if that should be possible. 
Photo of Drew N

Drew N, Alum

  • 262,826 Points 100k badge 2x thumb
Yes, you can add code to the head tag in page settings
Photo of George7467

George7467

  • 3,590 Points 3k badge 2x thumb
Great, so it sounds like that particular redirect code exists, I just have to find it and add it to my head tag.  Thank you!
Photo of George7467

George7467

  • 3,590 Points 3k badge 2x thumb
Here is an article about detecting and redirecting mobile users:

http://www.designyourway.net/blog/resources/detecting-and-redirecting-mobile-users/

I pasted the following code into the head tag of my non-mobile friendly Homestead website:

<script type="text/javascript">
<!--
if (screen.width <= 699) {
document.location = "http://newcastlepianohire.homestead.com/";
}
//-->
</script>

and then viewed it with an Ipod.  Sure enough, it displayed Ian's website (newcastlepianohire.homestead.com) instead of my non-mobile friendly Homestead website, so the auto-redirect worked!

I then ran Google's mobile friendly test on my non-mobile friendly Homestead website (with the above redirect code in its head tag) and the result was, "Awesome! This page is mobile-friendly."

As mentioned in the above article, this redirect method will not work if javascript is disabled, and it won't work if the screen resolution is higher than the value set in the code, but it will work on some phones, and it was amazing to see it work on the Ipod.

Thank you, Ian, for finding an easy way for Homestead users to create a free mobile friendly website with SiteBuilder!
(Edited)

This conversation is no longer open for comments or replies.