Jump to content


Photo
- - - - -

Centering Content Div

div pagelines content section

  • Please log in to reply
6 replies to this topic

#1 Anthony Luth

Anthony Luth

    Advanced Member

  • Members
  • 98 posts
  • LocationMinnesota, USA
  • Framework Version:Developer 2.3.8
  • Country: Country Flag

Posted 27 January 2013 - 11:04 PM

So I am having an issue, this works in some browsers, but not in others. My screen looks fine, but not sure why it I have to do it this way....

 

Please Login or Register to see this Hidden Content

Any idea if I can float it to the center instead of adding a padding?

 

div_content.png



#2 batman

batman

    Bat Learning

  • Members

  • 2056 posts
  • LocationBuenos Aires, Argentina
  • Framework Version:DMS
  • Country: Country Flag

Posted 27 January 2013 - 11:27 PM

Hi Anthony

Please you can see this Danny┬┤s reply

Please Login or Register to see this Hidden Content

Perhaps resolve you issue 



#3 Anthony Luth

Anthony Luth

    Advanced Member

  • Members
  • 98 posts
  • LocationMinnesota, USA
  • Framework Version:Developer 2.3.8
  • Country: Country Flag

Posted 28 January 2013 - 01:06 AM

Not quite! But thanks Batman!



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 15665 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 28 January 2013 - 07:42 AM

You're using the Nav Classic navigation section, the code on the post Batman linked is for the NavBar section. Use the code below instead.

 

Please Login or Register to see this Hidden Content



#5 Anthony Luth

Anthony Luth

    Advanced Member

  • Members
  • 98 posts
  • LocationMinnesota, USA
  • Framework Version:Developer 2.3.8
  • Country: Country Flag

Posted 28 January 2013 - 01:09 PM

That still messes it up, everything moves to the left outside of where the div should be.

 

div_content_fix.png



#6 Rob

Rob

    One Smart Egg

  • Members
  • 13575 posts
  • LocationEast Coast, USA
  • Framework Version:The Latest, of course
  • Country: Country Flag

Posted 28 January 2013 - 11:44 PM

Anthony,

 

If you look for these elements and adjust from this example, I think you'll find some success:

 

.main_nav_container.nosearch, .nosearch .main_nav {
    margin-left130px;
    margin-rightauto;
    positionrelative;
}
.navigation_wrap .main_nav_container {
    floatnone;
    width100%;
}
 
The margin-left above obviously will depend on various factors so it clearly needs individual adjustment.


#7 Danny

Danny

    Is Awesome!

  • Moderators
  • 15665 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 29 January 2013 - 01:06 PM

Do you have a link to your site?

 

Also, remove any custom CSS you have added related to your navigation menu, then the code I provided should work, just tested it on a test site of mine and worked as intended.







Also tagged with one or more of these keywords: div, pagelines, content, section