treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] Dynamic Page Size

  • Very simple, change your browser size in this blog (CSS-trick), then you see the object change their position and make a ordered page. It's so good, but I like more simple that this. Test this one in Yahoo.com, that's simple and I want like that.

    I want a trick, that make my blog dynamic, that change the object position and restrain blog from horizontal scaling.
  • Yahoo? I don't see media queries happening there.
  • See these pictures to understand my purpose:

    1- YAHOO.COM

    2- A Page Like My Blog
  • Post a link to your site, please.
  • www.baghbagho.com

    Remember you can't read the texts, because they are not EN.
  • Hey farzadina, both your site and yahoo's have a fixed width and no media queries, and so once the browser is shrunk passed a certain point there is going to be horizontal scrolling. If you shrink yahoo's site down further then you'll see the horizontal scrollbar appear. The way around this is to either create a responsive layout which uses media queries to change the width of your wrapper based on window size, or a flexible layout which uses percentages for your widths.
  • Hey, @Johnnyb, I was just wondering if there are any tutorials and such for building a responsive layout with media queries that you already know of. It would definitely be something I'd like to learn. In the mean time I shall do some searching myself.
  • As "furrball1383" said, how I can make a responsive or flexible layout?
    My blog page have horizontal scrollbar in 1024*768 screen resolution. Can one of that layout fix this problem?
  • Well, that is because you're page wrap is set at 1100px
  • @ChristopherBurton: Yes, I set wrapper width 1100px. Was that make this problem? and if yes, how I can fix that without changing the theme look?
  • Most use 960px but you will not rid yourself of the horizontal scrollbar. @JohnnyB has a fair suggestion.
  • I don't want to have a 960px width wrapper. I think @JohnnyB idea can keep my blog look without changing the width to 960px. But I couldn't understand his purpose from using those layouts. Please explain more.
    How can I keep my blog's theme look and have a correct view in common resolutions?
  • Common to those who actually view your blog (hint)? What is the statistics show on resolutions viewing your site?

  • As my blog's statistics say, +32% of my viewers have 1024*768 resolution screen, +10% have 1280*800 and +40% have other screen resolution.
    That told me I should have a true look in 1024*768 and that's so important for me.
  • Right, so if the majority of users use 1024, then you should have a wrapper that is less than 1000px (to save room for scrollbar, browser plugins, etc.).
  • That's right. But I saw CSS-Trick theme style sheet and finally I found a great solution: Using percent (%).

    But there is a problem. In CSS-Trick, there is a process:

    Smaller window size > Smaller objects

    And it's in my blog:

    Smaller window size > Static objects

    Here, all of the objects like pictures, will become smaller when the window is small. How I can use this trick in my blog?

    See this picture if you didn't understand my purpose.