Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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
PLUS
Caroline Hagan
Courses Plus Student 12,453 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!