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 How to Make a Website Styling Web Pages and Navigation Style the Portfolio

Mark Davis
Mark Davis
970 Points

Website resizing.

In the video Nick drags the right side of his screen to the right side to resize it. The header text stays centered and usable for mobile devices.

For me that doesn't work. i have tried 3 different browsers and have even downloaded Nick's code and tried that. Still nothing. The header text stays in the center and gets covered up when the page resizes.

What am I missing?

(I am on a Linux machine and have tried this with Firefox, Midori and Opera browsers.)

Jacob Herper
Jacob Herper
94,150 Points

Are you sure you've added the media queries correctly? Can you post your HTML and CSS please?

Tyler Dix
Tyler Dix
14,230 Points

Firefox and Opera are both not webkit-based browsers. Try this in Safari or Chrome and see if you have any good results. If it works in the webkit-based browsers, you would likely find that adding vendor prefixes to your CSS will solve the problem. It's a hassle, but it's the only way to get the results you're looking for across all browsers.

That's about as best as I can do without looking at your code.

By the way, a vendor prefix would look something like this:

-webkit (for webkit-based browsers) -o (for Opera) -moz (for Mozilla)

Hope this helps.

Tyler

Garrett Sanderson
Garrett Sanderson
12,735 Points

Hi Mark,

If you could kindly post your code so we can take a look at what might be giving you this issue.

Thanks!

1 Answer

Jane Marianne Filipiak
Jane Marianne Filipiak
7,444 Points

Hi Mark, I would like to help more, but will have to revise what I have learned regarding website resizing. From what I recall however, Tyler Davis's and Jacob Herper's answers will help to solve your problem.

Best of luck. Jane