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 :)
Share This Thread :

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.


Related Threads
Thread Author Replies Views Last Post
  Using Pretty Link and CPA offers SupremeWarrior 3 307 2018-08-30, 03:17 AM
Last Post: immart247
  About putting offer link in lander and iFrame SupremeWarrior 2 166 2018-08-26, 02:50 PM
Last Post: SupremeWarrior
  LRT (Link Research tools) take my money !! LRT is a fraud!!! HELP ME! Kadutz 7 523 2018-08-07, 09:58 PM
Last Post: Kadutz
  What CPA or other link / click methods do you use ? LorenzoSupreme 1 253 2018-07-18, 07:05 AM
Last Post: CharlieHarper
  Youtube comment link ltd79 2 344 2018-07-17, 09:14 PM
Last Post: Elites_Mate





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

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