Jump to content

Archived

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

seanocaside21

Column Padding forcing column to new row

Recommended Posts

seanocaside21+    10
seanocaside21

Hi there,

 

I am currently working on a simple 2 column layout. I have a backgound image and wanted to style the indivudual columns with their own background and padding. 

 

When i attempt to add padding to the column it forces the adjacent column to a new row. Any ideas how to get around this?

 

Here is the custom styling class i am using: 

 

/* White Section */
#site .white-section {background: rgba(255,255,255,0.7);  border-radius: 5px; padding:10px;  }
 
Thanks,
 
Sean

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Can you provide a link to the site in question.

 

As Columns are calculated so any increase to their widths will cause the issue you're having now. You will probably want to either not apply the padding to the column itself, but instead to a div lower down the dom and/or use the following CSS in your snippet.

 

box-sizing: border-box;

 

http://www.w3schools.com/cssref/css3_pr_box-sizing.asp


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
seanocaside21+    10
seanocaside21

Wroth noting that right-hand column only gets forced down when i hit preview.

 

All looks fine when editing. 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Do as I suggested above using box-sizing: border-box; to your code, this will resolve your issue.

 

http://cl.ly/image/0z093m2R3w1i

 

You shouldn't add padding to columns like that, you usually do that in the div after. However, using box-sizing will resolve the problem as you can see from my image.

  • Like 2

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
seanocaside21+    10
seanocaside21

Great Danny

thanks for your help.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

No problem.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • 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,
      Perry
    • chamois_blanc
      By chamois_blanc+
      Hello,
      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
      Rob
    • JawDesigns
      By JawDesigns
      Hi to all,
      I always have this problem and I'm unhappy with the fix I usually apply for aligning columns at the bottom (see attached).
      For example: I use two text boxes side by side. Both text columns have a background colour. Text column 1 has 200 words and text column 2 has 300 words.
      How do I easily get them to align at the bottom without using a min-height declaration? I want to get text column 1 with 200 words to fit the height of text column 2 if that makes sense?
      Thanks for any help on this!
      Cheers,
      James

×