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
  Redirect user based on certain ISP Mix2003_2012 4 141 2017-11-28, 11:41 PM
Last Post: styx
  How many accounts can i use the same link on INSTAGRAM? virtualhost 3 184 2017-11-08, 06:22 PM
Last Post: CallmeReaz
  Where To Put My CPA Link Into Landing Page? shervin 3 272 2017-10-25, 11:58 PM
Last Post: midastou4
  Need Download Button Ads insomniac 6 283 2017-10-24, 01:49 PM
Last Post: insomniac
  Frustrated by CPA offers which change their contents EthanTaylor 12 505 2017-10-18, 02:54 AM
Last Post: SparkCube





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

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