Download Link Change based on Screen Size
2014-08-05, 11:51 PM,
#1
Hi everyone

I want to write a code which will change my download link based on screen size in blogger.

Like if site is visited from mobile or tablet will have different download link and if site is visited from desktop/laptop will have different.

Anyone has any idea from where to start?

Help will be appreciated :)
2014-08-05, 11:59 PM,
#2
What you're describing are CSS media queries. They're used in responsive web design.

Basically, let's say you have a download button:
Code:
.download {
    color: green;
    height: 75px;
    width: 200px;
}
This download button, would be the same size no matter the screen size.

With CSS media queries, you can say:
Code:
@media(max-width: 768px) { /*at iPad viewport and below*/
    .download {
        height: 50px;
        width: 150px;
    }
}

Although, for your purposes, what I'd recommend doing is making your download button dynamic width:
Code:
.download {
    max-width: 400px;
}

Then, use CSS media queries to change the text size.

Hope I helped,
Chris
2014-08-06, 12:05 AM,
#3
I understood that it will change the download button size based on screen size but How do I change the "Download Link" based on media queries?
2014-08-06, 12:32 AM,
#4
(2014-08-06, 12:05 AM)bigbang007 Wrote: I understood that it will change the download button size based on screen size but How do I change the "Download Link" based on media queries?

Just did a JSFiddle for you
www.jsfiddle.net/Belongs to multi account user please report this now./n633x/
Latest Thanks - View all

yesman(2014-08-06 12:37 AM) 
2014-08-06, 12:38 AM,
#5
(2014-08-06, 12:32 AM)DropThePoptart Wrote:
(2014-08-06, 12:05 AM)bigbang007 Wrote: I understood that it will change the download button size based on screen size but How do I change the "Download Link" based on media queries?

Just did a JSFiddle for you
www.jsfiddle.net/Belongs to multi account user please report this now./n633x/

Thanks buddy.This is what I was looking for.Thanks you so much for your help :)
Latest Thanks - View all

DropThePoptart(2014-08-06 12:40 AM) 
2014-08-06, 02:41 AM,
#6
Thread moved to the correct section

Any questions related to CPA belong here.
Before posting, make sure you are in the correct section.

I am temporarily absent due to family circumstances.

2014-08-06, 02:56 AM,
#7
Thread closed as it seems the problem has been solved.


Possibly Related Threads...
Thread Author Replies Views Last Post
  Frustrated by CPA offers which change their contents EthanTaylor 12 391 Today, 02:54 AM
Last Post: SparkCube
  Need Download Button Ads insomniac 5 157 2017-09-11, 08:17 PM
Last Post: callieseye
  CPA Link Locker - French offers? COBNET 13 380 2017-09-03, 11:57 AM
Last Post: flash_drive
  Where to link landing page? 1st 7 180 2017-08-27, 01:10 PM
Last Post: Yogesh1998
  Is there a free vps that let you download a bot on it SeoFreak 5 187 2017-08-17, 11:33 AM
Last Post: LeoneAvaliani




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top