Making the images and text in the slider mobile-responsive

7 replies · opened Oct 31, 2016

VvanbennoOct 31, 2016

https://d2kpejp8x5bq63.cloudfront.net/

As you can see, at index.html I have a slider stylized to my liking with the help of your hard work / template. I have noticed, however, that when viewing the slider via mobile or a smaller screen the image and text do not respond dynamically. Is this something that can be mended? Is it possible to write out instructions for the browser to load a smaller image and font-size when viewed on a mobile screen? Is there an even better solution to this problem? It's been stumping me for a while and I'd like to resolve it.

Thanks!
-Van

SSemicolon WebSTAFFNov 2, 2016

Hello,

We Really Apologize about the Inconveniences caused!

This is Definitely Possible. Please consider using the Responsive Heights Functionality for the Image:

data-height-lg – Height for Large Devices >=1200px

data-height-md – Height for Medium Devices >=992px to 1199px

data-height-sm – Height for Tablets

data-height-xs – Height for Landscape Mobiles or Phablets.

data-height-xxs – Height for Portrait Mobiles

Example:


![attachment](images/logos/neoLogoLarge.png)

This will surely work fine. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

VvanbennoNov 3, 2016

Thank you! This worked very well for the image, but I still wonder if it is possible to do something similar with the text on the sliders. Do I just use Data-Height as a Style?

SSemicolon WebSTAFFNov 4, 2016

Hello,

This is Definitely Possible too! Consider using the Responsive Classes. You can add the following CSS Code to control the Font Size:

.device-lg .slider-caption h2 { font-size: 64px; }

.device-md .slider-caption h2 { font-size: 56px; }

.device-sm .slider-caption h2 { font-size: 48px; }

.device-xs .slider-caption h2 { font-size: 36px; }

.device-xxs .slider-caption h2 { font-size: 32px; }

This will definitely work fine. Let us know if we can help you with anything else or if you find any issues.

VvanbennoNov 6, 2016

Just putting that into my custom CSS folder will do all the work? I don't have to add additional classes to the index.html? That would be great! Unfortunately it seems like my IDE is either lagging or there is more to it that I'm not doing. aagh

SSemicolon WebSTAFFNov 7, 2016

Hello,

Yes! Simply adding the above code inside the css/custom.css File and linking this CSS File in your header as described in the Documentation > Start > Customization Section will work fine.

Hope this Helps! Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

VvanbennoNov 7, 2016

I figured out why this wasn't working well for me. I had to make adjustments and add additional custom CSS
For Example: I also had to redefine the specific font-size of other text elements within the slider-captions. If You don't do this then the captions will not respond as well as they could, and only your h2 tags will actually resize.

.device-lg .slider-caption h4 { font-size: 32px; }

.device-md .slider-caption h4 { font-size: 20px; }

.device-sm .slider-caption h4 { font-size: 15px; }

.device-xs .slider-caption h4 { font-size: 15px; }

.device-xxs .slider-caption h4 { font-size: 12px; }

I'm glad you guys are here to help dummies like me out. Thank you soo much

SSemicolon WebSTAFFNov 7, 2016

Hello,

Very Happy to Help! Really Glad that your issues were resolved. Thanks for your Patience.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard