• 0

Center not working

Question

Posted · Report post

I used yout class .center on a media box and it isnt centering.  I also tried to add the class "middle" and put "margin-left: auto" and "margin-right:auto" which no changed.  Also how com adding float in the custom css doesnt seem to work?  Seems like certain rules are not working in the custom css section of dms.

Share this post


Link to post
Share on other sites

2 answers to this question

  • 0

Posted · Report post

HI,

 

That won't work correct, I need to update the docs to inform users of this. Basically, when you add a class to the Styling Classes field, it adds that classes CSS to the section itself and not the content inside the section.

Lets say you have add HTML in a MediaBox to create add some text, for example.

 

<h1>This is a header in a MediaBox</h1>

 

If you want to center this, add the class to the HTML, for example.

 

<h1 class="center">This is a header in a MediaBox</h1>

 

http://cl.ly/image/1P1T2g3h1y3V

 

So if you want to add classes to specific content, you will need to add the class to that element and not the styling classes, as this is for the section itself.

 

The Styling classes come into use and are powerful if you want to add background colors to your sections, see our documentation here - http://docs.pagelines.com/tutorials/section-area-styling

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Thank so if I create a media box and in styling classes give it a name of "middle" then put custom css in for .middle it should change the css for that section correct?  If I put something else in that mediabox say html and give it the same class then it should still work correct?  And if I add a class to my html and add the code in "custom css" I should get the changes right?  I am doing that and wasnt getting changes.  I will attempt again but this seems pretty straightforward.  Thanks

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