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
  Changing offers based on system that user is on? HeyImMark 4 139 2018-01-28, 04:09 PM
Last Post: HeyImMark
  Facebook's News Feed Big Change N1mrod 3 268 2018-01-16, 05:01 AM
Last Post: Ginsan
  SEOclerks Affiliate link builder Warriorcpa 3 217 2017-12-17, 12:43 AM
Last Post: dnxoom
  Redirect user based on certain ISP Mix2003_2012 4 189 2017-11-28, 11:41 PM
Last Post: styx
  How many accounts can i use the same link on INSTAGRAM? virtualhost 3 242 2017-11-08, 06:22 PM
Last Post: CallmeReaz





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

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