Jump to content
Sign in to follow this  
Anthony Luth

Centering Content Div

Recommended Posts

Anthony Luth

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....

 

div.content {
  padding-left: 56px;
  position:relative;
}

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

 

div_content.png


Use PageLines Drag & Drop Framework and WordPress to build professional websites faster, easier and better than ever before.

Wordpress Developer | Programmer | Enthusiast

@tonyluth | http://www.luthwedding.com

Share this post


Link to post
Share on other sites
Anthony Luth

Not quite! But thanks Batman!


Use PageLines Drag & Drop Framework and WordPress to build professional websites faster, easier and better than ever before.

Wordpress Developer | Programmer | Enthusiast

@tonyluth | http://www.luthwedding.com

Share this post


Link to post
Share on other sites
Danny

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.

 

#site .navigation_wrap .main_nav { margin-right: 0; }
#site .main_nav ul { text-align: center; float: none; }
#site .main_nav ul > li { float: none; display: inline-block; }

Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Anthony Luth

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

 

div_content_fix.png


Use PageLines Drag & Drop Framework and WordPress to build professional websites faster, easier and better than ever before.

Wordpress Developer | Programmer | Enthusiast

@tonyluth | http://www.luthwedding.com

Share this post


Link to post
Share on other sites
Rob

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.

Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
Danny

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.


Please search our forums, before posting!

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  

  • Similar Content

    • sakkthi subramaniyam
      By sakkthi subramaniyam
      Working on a very old site which has  pagelines framework theme. I need section plugin. so i can install postpins section. I have lost backup copy.
      Thank you.
    • elementalkites
      By elementalkites+
      Good evening. I am attempting to use the Impulse section on a page I am working on (https://dev.elementalkites.com). The tool seems to have the ability to overlay a logo on top of the slider images but in my case it isn't working, even though I have added the logo file and given it a height to display at. I have attached a screenshot for reference. Any help would be appreciated.
       
       
    • tuciudadenred
      By tuciudadenred+
      Hi everyone, what happens is that the web page metrosalarmas.com has a google tags which I have not attacked where I can look to remove those tags and be able to locate the correct ones.
    • oseehys
      By oseehys+
      Hello There,
      So i want to use platform 5 and DMS sections on a single page, i am using a child theme with pinspro as my main theme and i activated platform 5, the only problem am having so far is the fixed option, my navbars are not aligning to their default size, and it will be great if platform 5 header and footer section will function, has anyone used this option, how can i make the best use of platform 5 and DMS on a site
      Cheers
    • thirdstonemedia
      By thirdstonemedia+
      I've been fighting with a resolution issue ? Want to use Flick Slider, the site looks great on my monitor but client says she can't see bottom of homes. I believe she's on an old PC using outdated browser/s ... but, she's important to me and I'd like to make this work, on her system. Without asking her adjust her own set-up. 
      I put the Flick Slider inside a container, here ::
      http://becauze.xyz/home-five
      Set the Height of Flick Slider to 50 Base ... I don't know how this works exactly ... there is a Base then a Min ... but, haven't adjusted the Min ::
      http://becauze.xyz/home-four/
      Tried using Splash Up, which presents the same issue (she can only see top of home) and she wants several images to rotate on Home page, so not sure this would work anyway ::
      http://becauze.xyz/
      I have tried going into Layout and making the width narrower, and that does make the site narrower, but the homes still don't display in full, on her system. Help ?

      Here are her screen grabs, both desktop and iPad  (dumped the chalkboard background).

      FInally, she said these look great ::
      http://www.sinclairaia.com/
      http://www.kristihanson.com/
      What am I doing wrong ?? Is there a better way to accomplish making the site look great on any resolution at any size ?
      Joanne
      (Longtime Pagelines-lover.)


×