Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS

Josue Negron
Josue Negron
1,770 Points

dashboard app not scaling on mobile devices

Hi!: I tried to modify the design for a dashboard web app that i'm currently developing. When I re-size the browser, the design scales as desired; the problem is that it is not scaling on mobile devices. Appreciate some tips on what i'm doing wrong. Dashboard web app: http://report.ciracet.com:81/admin_app/Dashboard/Dashboard.aspx

Thanks,

Josue Negron
Josue Negron
1,770 Points
@media screen and (max-width: 708px) {
.smll-reports { 
  display: block;
  width: 97%;  
}
#chrt1 { width: 96.5%; }
#chrt2, #chrt3{ width: 48%; margin-right: .6%;}

#chrt4, #chrt5 { width: 96.5%; }

}

3 Answers

Josue Negron
Josue Negron
1,770 Points

I just needed to add the meta name="viewport" content="width=device-width" tag to my project. Thanks anyway.

Caroline Hagan
Caroline Hagan
12,612 Points

Hi Josue Negron when you say the design scales, but not on mobiles... is it a particular area of the website that you're not happy with? I know you've posted the code for the .smll-reports (the blocks at the top, i.e. "308 May Opened PMs") but can you be a little more specific, as to what it's not doing and what you want it to do?

Josue Negron
Josue Negron
1,770 Points

Hey Caroline, thanks for your response. The problem is that I cannot get the web app to be responsive on mobile devices. i.e, as you noticed I want the blocks at the top to be displayed as block (instead of inline, when it gets to a width of 708px or less) and have a width of 97% (each block). When I resize the browser view port the design scales well, but when I open the web app on, for example, my Galaxy S4 the blocks are still displayed inline & so on with the charts... The design is in percentage. I don't know what I'm missing here. Appreciate your help. Thanks!