Jump to content

How To Add Padding To Specific Contentbox

Recommended Posts



I would like to add padding to a contentbox and several contentboxes.

I've looked into the W3SCHOOLS on Id and class but I don't seem to get it right.

1. How do I change padding on one specific Contentbox. The box i named "Contbx 1", se string below.

... more specific, what do I use in my custom code from the string below?

--- HTML--

<div class="scolumn-pad">

<section id="contentbox" class="copy no_clone section-contentbox">

<div class="copy-pad">

<div class="hentry Contbx 1">

<div class="hentry-pad Contbx 1-pad entry_content" style="padding-top: 41px; padding-left: 11px;">


<div class="clear"></div>

--- CSS--

element.style { padding-left: 11px; padding-top: 41px;


.hentry .hentry-pad { padding: 0 0 25px;


.entry_content {

padding: 0 10px;

2. How do I change padding on all my contentboxes? They are named Contbx 1, Contbx 2 and so on.

Kind regards

Share this post

Link to post
Share on other sites

you cant have spaces in classnames/ids

Thats why your css is failing

div class="contbx 1"> is a div with 2 classes, contbx and 1

Share this post

Link to post
Share on other sites

Many thanks Simon. Great

This solved my first problem.

Still I would like to understund which part of the the HTML- and CSS-string I should cut and paste into custom CSS.

It would be great to understand the logic behind this. It would save so much time.

Now I have pasted: .CbxSB2 .hentry-pad {padding-top: 42px; padding-left: 13px; }

But I also found that following will give the same result: .CbxSB2 .entry_content {padding-top: 42px; padding-left: 13px; }

Could I use anyone?

Which is the correct way to cut the correct pieces to paste in the custom sheet

Greatful for your support

Share this post

Link to post
Share on other sites

Thanks Catrina,

Any tips on how to find out a working custom code?

Or is it just a lot of trial and error to find out?

Share this post

Link to post
Share on other sites

You'll need to make sure that you're adding #page at the beginning of your CSS so that it's specific enough to overwrite any of the existing default CSS. For the most part, it is trial and error.

Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post

Link to post
Share on other sites

Ok, Just wished for some nice logical theory to guide me, beside the w3schools.

Anyway, thanks for your help.

I appreciate it a lot.

Share this post

Link to post
Share on other sites

The topic was marked as resolved.

Former PageLines Moderator, Food Expert and Raconteur

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Similar Content

    • lbhansen
      By lbhansen+
      I am slowly getting closer to something I like for the general appearance of my site. What's currently nagging me is trying to remove the top and bottom padding/margin from the image in the header. It seems that I've done what I want with the menu but there was dead space above the image and between the image and menu.
      Trying out padding and margin settings, I got something that came close to what I want but saw odd behavior along the way. Changing either the top or bottom padding to 0 (from blank), removed all padding from the top and sides but left a small band between the image and menu.
      Setting all eight padding and margin settings to 0 removed all except the band between image and menu. (But it seems that entering 0 in only the top or bottom padding option is all that was needed.)
      So, heading into the twilight zone, I changed the bottom margin to -1. That removed the band but allowed the menu to slightly overlap the image. AND, narrowing the browser, or viewing on a phone, caused the band to reappear.
      Perhaps there's also a problem with the menu but I don't see it.
      So that's where it stands at the moment: http://756.a44.myftpupload.com 
      I seems to me that if there is a default padding value, setting it to 0 should be all that's needed to get the two sections to meet perfectly on any device/browser width.
    • Perry
      By Perry+
      Hello There, 
      I am working with Platform 5 and have run into an unnerving problem. I am trying to position my clients picture along the bottom of the container, so that it sits right on the bottom. After a good hour of googling and messing with the CSS I figured I would ask the question here. Below is my screenshot displaying my problem. I will need to do this frequently in the future. 
      My Problem Image
      Unlike in DMS, when I add a margin to an embed or image box it simply makes the container larger while keeping the padding, I cannot have any padding or any space whatsoever on the bottom of my clients image.  Is there a way to remove all padding from the container so I can have this work across screen sizes? If not is there anyway to position an element directly at the bottom of another element in Platform 5? This seems like a basic feature and was easily attainable within DMS. 
      I cannot create an image combining all these elements as it will not scale well on mobile and will make my clients logo unreadable and her face incredibly small. 
      Thank you for any help,
    • chamois_blanc
      By chamois_blanc+
      I am a bit confused about the usage of percentages for section padding/margin settings in the PL5 UI. Percentages don't scale well for mobile devices (especially in height), so those settings are pretty much useless. Case in point, the defaults are expressed in rem units, not percentages:
      .pl-sn-pad { padding: 1rem; ... } Why force the user to use percentages in the PL5 section UI when it would have been as easy to let the user specify the unit?
    • Kempston
      By Kempston+
      Good day
      How do I indent textbox content so that it's not flush against the side of the screen on mobile devices?
      When I view Kempston Truck Hire East London on my phone, the text is aligned against the side of the screen and doesn't look right.
      Many thanks
    • pagelines_45
      By pagelines_45
      I am trying to remove the bottom padding from a media box.  When I inspect and change the value it works but I can not for the right css section names to change it in either the page css or custom code area.  I have even tried custom style for the page, but no luck.  Here is the site http://wordpress.howard-boats.com/  on the home page I am trying to get the wide sailboat image to touch the foot.  bottom-padding:0px  but I cant get it to work.  Thank you for your help I'm sure I am doing something stupid.