Scalable Images in Responsive Pages in EverWeb

Thursday, May 27th, 2021

Creating flexible, one page fits all devices, website designs is at the core of Responsive Web Design. EverWeb makes building responsive pages as easy as possible through its built in features, widgets and drag and drop capability. If you have built a fixed width website using a centered page layout, or are just new to web design and want to try out creating a responsive web design, you may find some challenges ahead of you…

A case in point comes when using images in a responsive page layout. As you scale the page, you can allow its images to automatically scale at the same time.

If this is what you want to happen but it doesn’t, what’s going wrong and how do get scalable images? In this post we will explore the background to images in responsive pages and explain how, with a bit of knowledge behind you, you will be easily be making pages with scalable images!

Adding an Image Directly on to a Responsive Page

Images can appear in a number of different ways on a responsive page depending on how and where they are added. For example, if you create a blank responsive page and drag and drop an image on to it in the Editor Window, you will see that the image occupies the full width of the page. Use the selection handles of the image to increase its height. When you preview the image, you should see that it scales as you change the width and height of the browser.

That is fine if you want your image to be full width across the page but often you may have one or more images that you want displayed on the page, but you do not want them full width.

Images in a Responsive Row Widget

Often images are added in to a Responsive Row widget as this widget is a great way to add fixed width objects to your page. And this is exactly what you have to remember… the images you add will be fixed width.

You can try this yourself to see the effect that it has on your page. First delete the image on the page if you added it from the above example so that your page is empty. Next, go to the Widgets tab and drag and drop the Responsive Row widget on to the page.

Once the widget is on the page, drag and drop an image inside the Responsive Row widget. Now go to the Metrics Inspector to check the width of the image. If the image is 350px or less wide, increase this to e.g. 600px wide. Make sure when you do so that you have ‘Constrain Proportions’ checked. If you preview the image, you will see that the image remains fixed in size. If you use your browser’s responsive design mode, you will be able to view the page as if it was being displayed on one of a number of different devices. For example, if you use Apple’s Safari Responsive Design Mode you can view the page as if it were being displayed on an iPhone SE, iPhone 8 or 8 Plus and so on. You should see that the image does not scale and also overlaps any device that has a screen width of less than 600 pixels wide.

the moral here of using a Responsive Row widget with images (or any other object for that matter) is that as the objects are fixed width, you may get problems on some devices if the image is too wide to be displayed properly.

Solving the Scaling Problem

So, how do we solve the problem of getting images to scale correctly and the knock on problem of having images always fitting within the width of all devices? The answer: The FlexBox and Text Section widgets!

Using either of these widgets will enable fully scalable images on your page. Choose the widget that best suits your requirements. In this example, we will use the FlexBox widget as it allows you to add more than one image at a time in the widget.

Start by deleting the Responsive Row widget from the page then add the FlexBox widget to the page. In the Embedded Objects section of the widget, click on the Add button below the ‘Embedded Objects’ list. Set the Object Type to Image.

Scroll down to the Image Settings section and click on the ‘Choose…’ button to add your image. Next, You delete the text that you see in the Styled Text Editor further down the page so that you just have the image on the page. Lastly, scroll back up to the Object Sizing Options section of the widget.

The important fields to use in this section are the Minimum and Maximum Width fields. If you set the Maximum Width as zero, the image will take up the width of the screen that is available to it from the Minimum Width value upwards. So you could make the Minimum with 250 (which will likely suit the smallest mobile phone) and leave the Maximum Width at 0. You could also set the Default Width to the same value as the Minimum Width.

Preview the page to see the effect. You should see the page scale correctly at all time. If you use your browser’s responsive design mode, you will also see that the page width will alway fit within the device it is being displayed upon.

Once you have tested your page, try adding a second Embedded Object to the FlexBox widget using the same parameters as above. Alternatively, duplicate the image and experiment with the Minimum and Maximum width values.

When using the Minimum value, it is usually a good idea to use a hard number e.g. 250. In this way you will more than likely accommodate the smallest mobile device. For the Maximum value, you could leave it as zero or even use a percentage value e.g. 95% of the width available to the object.

You can also add margins to the left and right side of the widget using the Margin fields in the Metrics Inspector which will keep the image away from the edges of the browser. There is much you can experiment with here so the advice is to start simple!

With a little bit of widget knowledge, it is easy to create great scalable images in your website that fit within any device they are displayed upon!

EverWeb on Social Media

You can also find EverWeb on the following social media platforms:

Facebook

Flipboard

YouTube

X

Instagram

Responsive Web Design in EverWeb: Make Your Pages Fit All Devices

Thursday, August 1st, 2019

Responsive Web Design is a great way to build a website in EverWeb that is consistent across all devices. You only need to design one page which will adapt to all device types. You no longer need to develop and maintain separate mobile pages in your website. The trade off, though, is that you have to put more care and attention in to your page design than you might have done before.

When developing your website, it may be easier to think of designing pages for use on desktop computers rather than designing pages for mobile devices. This makes sense, as it may be easier to take objects out of your design as you shrink the page down towards mobile device sizes, rather than adding objects in to the page as you upscale from a mobile page towards a desktop page size.

This design approach is generally fine, but can cause some problems when viewing your page on a mobile device. You may find that the page scrolls horizontally beyond the right hand margin of the mobile device creating a gap to the right of the page.

What Causes The Page to Drift Horizontally?

Ideally, the page should fit the horizontal dimensions of all devices it is displayed upon. The basic problem is that on a mobile device, a desktop page width is being used so the page does not behave in a responsive manner. There are a couple of easy ways to solve this problem which we will come to later, but first, it is important to discuss how the problem is caused in the first place.

Factoring In Minimum Device Width

One important factor to be aware of when designing responsive pages is the width of the smallest device that you are designing for. Typically the smallest device type that your website will be displayed upon will be an iPhone SE. The iPhone SE has a horizontal display width of 320 pixels so when designing your pages consider this value as it will help make your pages fit perfectly on the vast majority of devices, both mobile and desktop.

You usually do not need to consider maximum page width, unless you have objects that are too widely spaced out on the page. Our blog, ‘Using Content Maximum Width‘ delves in to this in more detail as does our video, Content Maximum Width, on YouTube.

When adding full width objects to the page, you do not need to consider minimum device width as such objects automatically scale to the available screen width. However, in some instances, you may need to check that the ‘Full Width’ checkbox is still checked in the Metrics Inspector. The ‘Full Width’ checkbox can become unchecked when using the Responsive Row widget. For example, when adding a full width widget inside the Responsive Row widget (e.g. a Text Section, FlexBox or Navigation Menu widget), be careful to make sure that the ‘Full width’ checkbox is still checked if you still want the object to be full width.

Usually, you do not need to add full width objects in to a Responsive Row widget, but there may be specific instances where you may want to do this.

If the object inside the Responsive Row widget is not at full width, it will actually be a fixed width object instead. So, for example, if you have a FlexBox widget that is 1000 pixels wide, on an iPhone SE you will be able to scroll 1000 pixels horizontally across the page.

To solve this issue, either check the Full Width checkbox in the Metrics Inspector to make the object full width or reduce the width of the FlexBox widget down to 320 pixels or less.

Minimum Design Width For Different Device Types

You may be thinking that objects on your page are now limited to a 320 pixel maximum width. Actually, this is not the case as some widgets will automatically scale content according to the device the page is being viewed upon.

The FlexBox and Text Section widgets are good examples of automatic scaling. For example, in the Widget Settings of the FlexBox widget, set Minimum Width, Default Width and Maximum Width values to ‘100%’ for images. This will scale the image properly on all device types. That is all you need to do!

Using Show On Device For Different Device Types

If you are not using widgets such as those mentioned above, you may need an alternative method to make sure that objects appear at the right size on all device types. This is where ‘Show On Device’ in the Metrics Inspector is very useful. For example, you have an image inside a Responsive Row widget that you want to display properly on all device types. Select the image and make it 300 pixels wide in the Metrics Inspector and check ‘Show on Mobile’ in the ‘Responsive’ section. Uncheck the other three Show on Device options. The image will probably disappear as it is only visible on mobile devices. You can see the image outline by using the Window-> Show Hidden Objects menu. Also, if you reduce the width of the Editor window enough the image will appear.

Add the same image from the Assets List into the Responsive Row widget. This time make it 600 pixels wide. In the ‘Responsive’ section of the Metrics Inspector check ‘Show on Tablet’ and uncheck the other three options. Again the image may disappear but you will see its outline displayed if you have the ‘Show Hidden Objects’ menu option set on.

Finally, add the same image a third time and make it e.g. 775 pixels wide. Check ‘Show on Desktop’ and ‘Show on Wide Desktop’. Uncheck the other two options.

When you preview the page, you will notice that as you shrink the size of the browser window, the image in the Responsive Row will be fit properly for all device sizes, i.e. 300 pixels wide on a mobile device, 600 pixels wide on a Tablet and 775 pixels wide on desktop and wide desktop devices.

Testing Your Responsive Pages

When finished, it is recommended that you preview the page in Safari’s Responsive Design Mode. Safari has possibly the best responsive design browser feature. To enable it in Safari, go to the Safari-> Preferences menu. Click on the Advanced button then check the ‘Show Develop menu in menu bar’ box. Close the Preferences dialog box. You will now see the ‘Develop’ menu in Safari’s menu bar. Use the Develop-> Enter Responsive Design Mode menu option to test your website’s pages against different device types.

Responsive Design can be challenging, but with a bit of thought and creativity, problems such as horizontal page drift can be easily resolved.

If you have a comment or question about this blog post, please let us know in the Comments Section below!

EverWeb on Social Media

You can also find EverWeb on the following social media platforms:

Facebook

Flipboard

YouTube

Twitter handle @ragesw