Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1. #1
    Join Date
    Jul 2007
    Posts
    64
    Plugin Contributions
    0

    Default Make width 95% and yet shrink to 750px?

    I would like to make the page width 95% and when the browser window is reduced the page shrinks to 750px. How can I achieve this?

    The stylesheet currently has the page width of 95%.

    mainWrapper {
    background-color: #ffffff;
    text-align: left;
    width: 95%;
    vertical-align: top;
    border: 2px solid #00AFF0;
    }

    Your help is very appreciated!

  2. #2
    Join Date
    Jul 2007
    Posts
    64
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    Surely there is a simple solution?

  3. #3
    Join Date
    Mar 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    Why not add something like:

    width: 95%;
    min-width: 750px;

    IE does not support the min-width feature, most other browsers do. Google around for a fix for IE.

  4. #4
    Join Date
    Jul 2007
    Posts
    64
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    Thank for the tip Brickoneer.

    Yep, min-width works fine in firefox. After a bit of a search I found that min-width should also work for ie7, haven't tested this though. A hack like this may may also work, (didn't work for my version of ie though):

    min-width: 800px;
    width:expression((document.documentElement.offsetWidth < 820)? “800px”: “auto” );

    See more: HERE

  5. #5
    Join Date
    Aug 2006
    Posts
    38
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    I'm trying to get mine to go to 100% but am having no luck. I have changed mainWrapper in the CSS files to be 100% from the 85% but it still hasn't changed.

    Is there anywhere else that controls the overall width of the entire site?

    Thanks!

    Jake

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Make width 95% and yet shrink to 750px?

    That depends on what template you are using.

    Some templates set widths for the parts of the page as well as for #mainWrapper, and some commercial templates have all sorts of non-standard tags for parts of the page, so standard fixes are irrelevant.

    And are you sure you edited the right copy of stylesheet.css? It needs to be the one in the template folder you have active.

    With a link to your site, we could tell you exactly what will work in your case.

  7. #7
    Join Date
    Dec 2005
    Posts
    105
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    I'm having the same sort of problems.

    My site seems to display nicely in 800 resolution or in a reduced size window - but in full screen it throws the graphic across to the right.
    Is there any way I can stop this. Basically i'd like my site to be no wider than the width of the logo? or just slightly bigger say 800 pixels maxium - regardless of the resolution being used.
    I guess its something in the stylesheet but I've played about with it and nothing seems to change regardless of what I do.

    The site is www.rosebarnnursery.co.uk
    thanks

    Phil

  8. #8
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    Code:
    #mainWrapper {
            width:741px;
    	margin: auto;
    }
    Add the part in red
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  9. #9
    Join Date
    Dec 2005
    Posts
    105
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    thanks Mike but that doesn't seem to work either. It just seems to ignore what I put in the css file.

  10. #10
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: Make width 95% and yet shrink to 750px?

    Actually it work fine but your logo is only 741px wide so 800px looks stupid.....which is what you put there
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Disabling column width and box width
    By mesnitu in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 14 Sep 2015, 04:58 PM
  2. Column Width and Sidebox Width not working
    By khopek in forum Customization from the Admin
    Replies: 11
    Last Post: 8 Jan 2010, 06:22 PM
  3. How do I make it 100% Width?
    By n_kip in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Jul 2008, 05:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR