Community Forums › Forums › Archived Forums › Design Tips and Tricks › landing page template width
Tagged: landing page
- This topic has 5 replies, 4 voices, and was last updated 7 years, 10 months ago by
Angelo.
-
AuthorPosts
-
February 1, 2018 at 6:36 am #215957
Annamarie
ParticipantHi
My CSS is really rusty, my PHP is truly minimal, so I'm turning for help for what is a no-brainer for some.
I have a landing page template that goes full-width - for which I'd actually like to have some margin. How do I do that? Here's the code I'm using.. Must have found it on the Genesis site when doing my design some two-three years ago. Thanks for help!
https://www.sharinghousing.com/homemate-compatibility-assessment-token-required/<?php /* Template Name: Landing */ // Add custom body class to the head add_filter( 'body_class', 'add_body_class' ); function add_body_class( $classes ) { $classes[] = 'landing-page'; return $classes; } // Force full width content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); // Remove header //remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); //remove_action( 'genesis_header', 'genesis_do_header' ); //remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); // Remove navigation remove_action( 'genesis_after_header', 'genesis_do_nav' ); remove_action( 'genesis_after_header', 'genesis_do_subnav' ); // Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs'); // Remove footer widgets remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); // Remove footer remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); genesis();February 1, 2018 at 7:52 am #215964Victor Font
ModeratorChange the max-width setting in this CSS at line 649 in style.css:
.site-inner, .wrap { margin: 0 auto; max-width: 1200px; }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?February 2, 2018 at 8:25 am #216038Annamarie
ParticipantWouldn't that change it for all my pages not just the landing page?
My CSS is rusty, could I do?
.landing-page .site-inner, .wrap {
margin: 0 auto;
max-width: 1200px;
}Change max-width of course
February 2, 2018 at 8:50 am #216039wputler
MemberHi - it looks like you can target only your landing pages with:
.page-template-page_landing .site-inner .content-sidebar-wrap { padding: 40px 80px; }February 2, 2018 at 9:20 am #216041Annamarie
ParticipantNope - doesn't hook and actually leaves some elements still in full width. Dang.
February 2, 2018 at 9:34 pm #216047Angelo
Memberchange your-theme-landing for your theme landing class, then Place it at the end of your stylesheet
.your-theme-landing .wrap {
max-width: 100%;
}
.your-theme-landing .wrap .entry{
margin: 1%;
} -
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.