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

Something wrong horizontally alignment on pages of this site. :/

Hi everybody,

I'm doing exercises on this site: www.tlgcntn.com/yoruksan .

When I go to the from 'Ana Sayfa - Homepage' to "Hakk?m?zda - About", site content a little bit move to right.

I think this problem about alignment codes in the css file.

I'm working for hours but could not find a solution. Where I doing wrong ? :/

Thanks. Tolga.

5 Answers

I see. That's because of the scroll bar on the right edge appears on the longer page, but is not there on the shorter page. When the scroll bar appears, it makes the window narrower, which means the centered page content will be shifted slightly.

Hi Tolga, it looks like your content div is set to 1440px wide. If you set the width to 100%, that should fix your issue. Let me know if that helps or not.

Thanks for your reply. But doesn't work :/

I updated css file( content div width set to 100% now.)

Looks like it's working for me (see: http://cl.ly/image/0I2G2A363Q0z), but maybe I'm misunderstanding your question?

Make sure to hard-refresh (clear your cache) to be sure your page loads the newest CSS.

Hmm. I think, ? wasn't explain myself. This site alignment good but;

When I visited index.php and clicked the 'hakk?m?zda - about' from the navigation bar to -> about.php page, site content (all of the page) little bit move to right.

I was tried different browser:

Chrome, Firefox and Opera doesn't work. But IE work awesome.

I hope, you understand me. If you dont understand me, I will capture short video for this situation.

I'm so sorry for my bad English.

You are looking good on my end with Google Chrome. I used a straight edge on my screen and the content stays aligned without a shift that I saw. Curious to see what the video might show.

No need to apologize for your English. You're doing just fine.

I captured this video from my chrome browser. http://youtu.be/1wGrEwirixY I saw same situation Opera and Firefox browser. But IE work perfectly.

In this video, you should see the site logo or other contents(slider area etc.) move to little bit to right and than again left.

Yes! Thats very helpful :)

Thank you all for your help. Problem has been solved.