Setting different colour backgrounds to different sections of site
webwigman
Registered Users Posts: 13 Big grins
Hi I am trying to emulate the structure of my existing website on my SmugMug page. I need the header section to include my logo and navigation to have a black background and the rest of the body to be white. I would also like the footer to be a green colour. My SmugMug URL is https://andrewboscherphotography.smugmug.com/ and my main site is http://andrewboschierphotography.co.uk
Any help would be much appreciated.
Andrew.
0
Comments
hi - using your web browser developer tool (example in Chrome click View - Developer - Developer Tools) you have to find the unique number of the specific widget you wish to change the background color.
Next - insert the CSS/HTML content block and add the CSS to change the background color.
Example
.sm-page-widget-18293841 {background-color: #ff0000; }
SmugMug Sites - Creative Examples
Favorite Images and SmugMug Designs
Hi Jerry,
Thanks for the info, I have managed to change the logo container. The nav seems to be part of the general page content so if I change the background of that the whole site's background is black. Also the same applies to the footer area.
Andrew.
Add this to your site-wide theme's CSS:
You need to remove the 5px bottom-margin in your logo container.
Also, you have no content in your footer. Once you add content, the greenish color should show.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Thanks so much guys, I have now got the top part of the site as I want it and I am now working on the content for the footer.
Hi Guys,
I have a small niggle in that now I have set the backgrounds I have moved the nav bar up to the top alongside the logo bar there appears to be a 1 or 2 px gap. I can't seem to get rid of it no matter how much margin I put around the elements. Also is it possible that I can set the height of these elements to match that on my website.
The CSS in the theme is:
.sm-user-ui .sm-page-widget-nav {
background-color: #000;
padding: 0 px 0;
}
.sm-user-ui .sm-page-layout-region-footer {
background-color: #459290;
}
My SmugMug URL is https://andrewboscherphotography.smugmug.com/ and my main site is http://andrewboschierphotography.co.uk
Thanks for help with this.
Remove this from your CSS:
Replace it with this:
Your logo and nav should be in the header section
.sm-page-layout-region-header
, but if it's working for you I guess you don't need to move it. If you were to change it, you'll need to replace.sm-user-ui .sm-page-layout-row[data-layout-row="z8"]
for this.sm-user-ui .sm-page-layout-region-header
.Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Thanks Mike,
How do I access this CSS?
I am looking at the Chrome developer tools but can't find those entries.
Thanks
Andrew.
Hi again,
I have found the entries in the Firefox developer mode but do not know if this can be saved from there.
Thanks,
Andrew.
You will need to enter the CSS in your SmugMug site; it can't be saved from the Firefox developer tool into smug.
Musings & ramblings at https://denisegoldberg.blogspot.com
Hi Denise,
Where do I access this CSS?
Customize > Content and Design > Entire Site > Theme > Active Theme (wrench). Click on that. You'll see "Edit Theme > Advanced " go to the bottom and click on CSS. Your custom CSS should be there
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk
Hi again,
Many thanks for the help. :-)
I have pasted content into the custom CSS box and moved the logo bar and nav bar into the header. I still have the small jog on the nav bar around a couple of pixels. Also wondering if I can add some padding to both bars as it is very tight around the logo.
I'm not seeing the "jog" as before. You must have fixed it.
Also, your URL in your signature is wrong.
Images in the Backcountry
My SmugMug Customizations | Adding CSS to Your Site | SEO for the Photographer | Locate Your Page/Widget Number | SmugMug Help Desk