Jump to content
Sign in to follow this  
danielfinn

CSS help: Alter padding between boxes or spans within grid system

Recommended Posts

danielfinn

I am wanting to alter the padding between boxes within the pagelines framework or between spanned elements within the pagelines grid system. For example, is there some CSS code I can apply which will modify the default spacing between such HTML code as this...

	
TEST BODY
TEXT BODY
[/code]

Are there some CSS tags which will alter the space between boxes and spanned sections?

Share this post


Link to post
Share on other sites
batman
Hi, I??m not sure but... You can try modify ..% ..px as you like [code].row > .span6, .row-fluid > .span6 { width:48.936170208%; } .row > [class*="span"], .row-fluid > [class*="span"] { float:left; margin-left:2.127659574%; margin-bottom:20px; }[/code] I hope it??s usefully

Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
Danny
Hi Daniel. Can you add an image to show exactly what you're trying to achieve please.

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
danielfinn
I have created this set of grids by using the following code: [code]
What I do Services
Pricing
[/code] I would like to alter the distance between the what I do and services sections (the two div span6 sections). I would like this padding to be applied to any number of spans within the pagelines grid system - not just solely the span6 one. For example, have 10 pixels between everyone one span within the pagelines 12. [img]http://www.danielfinn.co.uk/danielfinn/wp-content/uploads/2012/07/Screen-shot-2012-07-18-at-13.38.00.png[/img] I entered the following code and it definitely worked in altering the distance betweenness spanned sections, however, it caused the spanned sections to mess up the page structure as it seems as if the body is too small. A screen shot is below: [code] .row > [class*="span"], .row-fluid > [class*="span"] { float:left; margin-left:4.127659574%; /* instead of the default 2.127659574% */ margin-bottom:20px; } [/code] [img]http://www.danielfinn.co.uk/danielfinn/wp-content/uploads/2012/07/Screen-shot-2012-07-18-at-13.59.32.png[/img]

Share this post


Link to post
Share on other sites
beardedavenger
[b]Giving advice to alter margins and padding on the grid is very bad advice.[/b] Couple things. The margin and spacing on the grid isn't meant to change. If you do, it wrecks the entire grid, and you'll play hell trying to get it to look nice responsively. Not to mention that if you don't do it right (.ie, adding a class to style it specifically) then you're going to wreck the entire site. I'd leave them as they are, and if you want more space, add padding into your div or something. Also, you have a question mark for a closing div. http://screencast.com/t/tTdSO7ZJ NIck

Something big is coming for DMS + photographers.

http://fotostheme.com

 

Nick Haskins & CO - New home for all of my PageLines Store products! 

http://nickhaskins.co

 

Better DMS - News, Tutorials, and Tips

http://betterdms.com

 

Share this post


Link to post
Share on other sites
danielfinn
Thanks for the reply. I have corrected that - was a typo. By any chance could you give me an example of a div with padding?

Share this post


Link to post
Share on other sites
beardedavenger
Ya ok so an example. Your original markup below, and I added a class "padded" after span6. This means we can now target this specific div (instead of changing .span6 and have it affect the entire site). [code]
What I do
Services
Pricing
[/code] So now in your custom code section, you can do this. [code].span6.padded { padding:10px; .box-sizing(border-box); }[/code] If it doesn't work, get more specific with the CSS. Ex [code]#page .row .span6.padded { padding:10px; .box-sizing(border-box); }[/code] Hope this sets you on your way to becoming a web ninja. Nick

Something big is coming for DMS + photographers.

http://fotostheme.com

 

Nick Haskins & CO - New home for all of my PageLines Store products! 

http://nickhaskins.co

 

Better DMS - News, Tutorials, and Tips

http://betterdms.com

 

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

Sign in to follow this  

×