{"id":8615,"date":"2016-12-16T15:38:57","date_gmt":"2016-12-16T22:38:57","guid":{"rendered":"https:\/\/www.yola.com\/blog\/?p=8615"},"modified":"2022-08-08T02:44:38","modified_gmt":"2022-08-08T09:44:38","slug":"custom-panel-widget-the-secrets-behind-spacing","status":"publish","type":"post","link":"https:\/\/www.yola.com\/blog\/custom-panel-widget-the-secrets-behind-spacing\/","title":{"rendered":"Custom Panel Widget: The secrets behind spacing"},"content":{"rendered":"<p>The Yola Custom Panel Widget is an incredibly powerful tool.&nbsp;With this flexible widget alone, you&#8217;re able to build anything from a <a title=\"5-minutes website fixes: Look like a big brand with a custom footer\" href=\"https:\/\/www.yola.com\/blog\/5-minutes-website-fixes-look-like-a-big-brand-with-a-custom-footer\/\">custom footer<\/a>, an image with text overlay, or even a bar to span the width of your page.<\/p>\n<div id=\"attachment_8616\" style=\"width: 510px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-8616\" loading=\"lazy\" class=\"wp-image-8616 size-full\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Custom-panel-widget-example.png\" alt=\"Custom-panel-widget-example\" width=\"500\" height=\"378\"><p id=\"caption-attachment-8616\" class=\"wp-caption-text\">Bar built with Custom Panel Widget<\/p><\/div>\n<p>But in order to use the Custom Panel effectively, you need to know the secrets behind spacing. Look no further. By the end of this post, you&#8217;ll be a Custom Panel pro.<\/p>\n<h2><strong>Margin<\/strong><\/h2>\n<p>Margin in web design is the amount of space&nbsp;that separates the widget you&#8217;re editing from any other widget on the page. For example, in the screenshot below, we&#8217;ve added 5 rem&nbsp;units (a unit of measurement used in responsive web design) to the top and bottom of the widget:<\/p>\n<p><a href=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Paddin-Settings.png\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8620\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Paddin-Settings.png\" alt=\"Margin Settings in yola\" width=\"500\" height=\"378\"><\/a>And in turn, we have 5 rem units of space between the Custom Panel and the other elements on the page:<\/p>\n<p><a href=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Margin.png\"><br \/>\n<img loading=\"lazy\" class=\"aligncenter size-full wp-image-8619\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Margin.png\" alt=\"Margin within Yola\" width=\"500\" height=\"378\"><\/a><\/p>\n<p><strong>Pro tip:<\/strong> If you want your Custom Panel to run the entire width of your page, your body padding in Style Designer must be 0 rem units on the right and left.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8621\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/body-padding.png\" alt=\"body padding in Yola\" width=\"258\" height=\"219\"><\/p>\n<h2><strong>Padding<\/strong><\/h2>\n<p>While margin refers to the space <i>around<\/i> the widget, padding refers to the space <em>within<\/em> the the widget. For example, below you will see we&#8217;ve added 9 rem units to the top of our Custom Panel, 5 to the right, 5&nbsp;to the bottom, and 5 to the left.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8624\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Padding-Settings.png\" alt=\"Padding-Settings\" width=\"500\" height=\"338\"><\/p>\n<p>This keeps our text from touching the borders of our panel.<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8625\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/Padding.png\" alt=\"Padding\" width=\"500\" height=\"378\"><\/p>\n<p><strong>Pro tip:<\/strong>&nbsp;The extra spacing within the Custom Panel above aligning&nbsp;the text to the left-hand side was created by adding a Column Divider Widget within the Custom Panel:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8626\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/column-divider-widget.png\" alt=\"column-divider-widget\" width=\"507\" height=\"214\"><\/p>\n<h2><strong>Content Width<\/strong><\/h2>\n<p>Last but not least, content width. Content width allows you to decide how much of your Custom Panel you&#8217;d like your content to use.<\/p>\n<p>For example, here is a website where content width is set to 100%, and the text spans the entire screen:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8629\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/content-width-settings-100.png\" alt=\"content width settings 100%\" width=\"500\" height=\"338\"><\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8627\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/No-content-width.png\" alt=\"No-content-width\" width=\"507\" height=\"214\"><\/p>\n<p>And here is the same site with the content width set to 1200 px units and the text is limited to a contained area:<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8630\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/content-width-settings-1200-px.png\" alt=\"content-width-settings-1200-px\" width=\"500\" height=\"338\"><\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-8631\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/content-width-1200-px.png\" alt=\"content-width-1200-px\" width=\"507\" height=\"214\"><\/p>\n<p><strong>Pro tip:<\/strong> It&#8217;s always a good idea to add at least 1 rem unit of padding to the right and left of your Custom Panel when&nbsp;using content width. This allows for space to be added when viewing your site on a mobile device.<\/p>\n<div id=\"attachment_8632\" style=\"width: 560px\" class=\"wp-caption aligncenter\"><img aria-describedby=\"caption-attachment-8632\" loading=\"lazy\" class=\"wp-image-8632 size-full\" src=\"https:\/\/www.yola.com\/blog\/wp-content\/uploads\/2016\/12\/content-padding-content-width.png\" alt=\"content-padding-content-width\" width=\"550\" height=\"432\"><p id=\"caption-attachment-8632\" class=\"wp-caption-text\">Padding on left, no padding on right<\/p><\/div>\n<p>As you can see, the design possibilities with the Custom Panel Widget are endless. What have you done with the Custom Panel on your site? Let us know in the comments below!<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Yola Custom Panel Widget is an incredibly powerful tool.&nbsp;With this flexible widget alone, you&#8217;re able to build anything from a custom footer, an image with text overlay, or even a bar to span the width of your page. But in order to use the Custom Panel effectively, you need to know the secrets behind&hellip;&nbsp;<a href=\"https:\/\/www.yola.com\/blog\/custom-panel-widget-the-secrets-behind-spacing\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Custom Panel Widget: The secrets behind spacing<\/span><\/a><\/p>\n","protected":false},"author":24,"featured_media":8967,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"[\"title\",\"meta\",\"content\",\"tags\",\"comments\"]","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false},"categories":[130],"tags":[1106,1102,622,1105,1103,1104,90],"_links":{"self":[{"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/posts\/8615"}],"collection":[{"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/comments?post=8615"}],"version-history":[{"count":8,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/posts\/8615\/revisions"}],"predecessor-version":[{"id":8975,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/posts\/8615\/revisions\/8975"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/media\/8967"}],"wp:attachment":[{"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/media?parent=8615"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/categories?post=8615"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yola.com\/blog\/wp-json\/wp\/v2\/tags?post=8615"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}