Jump to content

Maximum site width

Recommended Posts

I've been able to add CSS to set max width for the banner and overlay, but it doesn't center the image or work with small screens, AND then I still have to deal with the menu/brand ares (see screencaps).

I'm thinking that setting a maximum width for the site that applies to 

  • banner (and overlay)
  • menu
  • page content
  • galleries
  • etc.

But I can't seem to track down appropriate CSS. 

(Note: I'm a designer, not a developer or programmer, so this is part of my ongoing learning experience.)

 

no-code_normal.png

no-code_wide.png

with-code_small.png

with-code_wide.png

Link to comment
  • Replies 15
  • Views 4.1k
  • Created
  • Last Reply

Howdy! If you're trying to fix an image issue - I would edit/crop the image as you want it before adding it to the site. But I'm not sure that's the problem? I actually don't see the image behavior that you're capturing with screenshots so maybe that's been fixed. If you want to limit the width of your content and navigation/site title/logos:

//limit content width ever expanding
#site{
     max-width: 1000px; /*Adjust here.*/
     margin-right: auto;
   margin-left: auto;}
//limit nav/logos/titles
.header-inner {
  max-width: 1000px; /*Adjust here.*/
}

 

founder of herz.works and maker of dope playlists.

Link to comment
On 10/7/2019 at 3:15 PM, ctmccosh said:

Howdy! If you're trying to fix an image issue - I would edit/crop the image as you want it before adding it to the site. But I'm not sure that's the problem? I actually don't see the image behavior that you're capturing with screenshots so maybe that's been fixed. If you want to limit the width of your content and navigation/site title/logos:


//limit content width ever expanding
#site{
     max-width: 1000px; /*Adjust here.*/
     margin-right: auto;
   margin-left: auto;}
//limit nav/logos/titles
.header-inner {
  max-width: 1000px; /*Adjust here.*/
}

 

This works for the nav, but I still need a max width for banner/banner overlay that doesn't affect small views.

This is what I have for that (I've applied it for preview purposes), but

  • small screens look like attached screen cap
  • and banner image is aligned top
.banner-thumbnail-wrapper #thumbnail img { 
    max-width: 1400px !important; 
    width: 100vw !important; 
    height: auto !important;
    margin: 0 auto !important; 
    display: block !important; 
    top: 0 !important; 
    }

.banner-thumbnail-wrapper #thumbnail { 
    background-color: #FFF; 
    }

.color-overlay { 
    max-width: 1400px !important; 
    width: 100vw !important; 
    height: auto !important;
    margin: 0 auto !important; 
    display: block !important; 
    top: 0 !important; 
    }

 

Link to comment
5 hours ago, RatherGood said:

2019-10-09 08_57_34-What We Do — Riverdale Community Midwives.png

Ah! media screen! So that code only applies above certain screen sizes and leave the image alone for smaller ones, right? 

// looks like it's falling apart around 930px adjust as you need...
@media only screen and (min-width: 925px) {
  .banner-thumbnail-wrapper #thumbnail img { 
    max-width: 1400px !important; 
    width: 100vw !important; 
    height: auto !important;
    margin: 0 auto !important; 
    display: block !important; 
    top: 0 !important; 
    }

.banner-thumbnail-wrapper #thumbnail { 
    background-color: #FFF; 
    }

.color-overlay { 
    max-width: 1400px !important; 
    width: 100vw !important; 
    height: auto !important;
    margin: 0 auto !important; 
    display: block !important; 
    top: 0 !important; 
    }
}

 

founder of herz.works and maker of dope playlists.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.