Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme »

How To: make Atahualpa more responsive/mobile friendly


 
Prev Previous Post   Next Post Next
  #7  
Old Dec 26, 2014, 01:20 AM
Alan_OldStudent's Avatar
Alan_OldStudent
 
46 posts · Oct 2013
Northwest United States
Hi Ken,

I tried to follow this suggestion.
Quote:
Originally Posted by kdawes01
Scalable Header Image...

To make your header image scaleable by browser width (viewport) you can try the following.
In the ATA "Header Image" area go to "Header Image: Height" set it to 0 (yes, zero!) and save.

Now go to "HTML/CSS Inserts" area and add the following to "CSS Inserts"

Code:
div#imagecontainer {
background-size:cover !important;
padding-top:23.9%;
}
The percentage to use for the padding value will depend on the aspect ratio of your header image. i.e. If your header image is 980x234 px then 234÷980= .234, so the height of the image is 23.4% of its width.

This works because css figures top and bottom padding percentages relative to the width of the containing block. Background images will display beneath a block's padding, so if the top padding equals the height of the background image, the whole image will be visible. Even though we set the height to zero, the padding still contributes to the height of the container.
My header images are 1210 x 200 px, and so I figured the aspect ratio of 16.53%. I set the height at 0, and then went to look for a good spot to add this code:
Code:
div#imagecontainer {
background-size:cover !important;
padding-top:16.53%;
}
At first, I went to ATO>Various Content Items>add HTML/CSS inserts. That didn't work, and so I went looking for other places, but really, they only affect overlay. Please let me know where I should add this.

Regards,

Alan OldStudent
The unexamined life is not worth living—Socrates
Gracias a la vida, que me ha dado tanto—Violeta Parra
 

Bookmarks

Tags
atahualpa, mobile, responsive



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to use CCS to make Atahualpa Smart Phone Friendly Megan1967 Atahualpa 3 Wordpress theme 7 Jul 31, 2014 02:28 PM
plugin that shows a mobile-friendly version Atahualpa site Carme Plugins & Atahualpa 11 May 3, 2014 07:17 PM
What's your take: responsive theme vs. mobile plugin ymf Montezuma Theme 2 Nov 26, 2012 06:53 PM
Possible to make category plugin friendly araneum Page & Category Menu Bars 1 Feb 9, 2009 04:56 PM


All times are GMT -6. The time now is 07:57 PM.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.