Help me centering the objects/elements.

3 replies
  • WEB DESIGN
  • |
Ok so I'm trying to make a responsive theme. But I have a problem with centering the objects within <div id="post-detail">. But centering the things within <div id="sharethis" > and <div id="long-desc" > when the screen is less than 611px wide wasn't any problem when I added this code to my style.css:

@media screen and (max-width: 611px) {

#content-post{
max-width:970px;
width: 100%;
float:left;
height:auto;
padding-top:15px;
margin: 0px auto;
text-align: center;
}
}
You can check out the site here: AlphaCore Survival Kit | Alpha Survival Gear



Please help me centering the objects within <div id="post-detail">.

Thank you,

Jimmy
#centering #objects or elements
  • Profile picture of the author David V
    You can just center the featured part (image, title, description)

    Code:
    @media screen and (max-width: 615px)
    .feature-content {
    float: none;
    margin: 0 auto;
    padding-right: 10px;
    max-width: 302px;
    width: 100%;
    line-height: 20px;
    }
    
    @media screen and (max-width: 611px)
    .slideshow-image-post {
    float: none;
    position: relative;
    margin: 0 auto;
    top: 0px;
    left: 0px;
    height: 250px;
    width: 300px;
    text-align: center;
    }
    {{ DiscussionBoard.errors[8616438].message }}
    • Profile picture of the author taskemann
      Originally Posted by David V View Post

      You can just center the featured part (image, title, description)

      Code:
      @media screen and (max-width: 615px)
      .feature-content {
      float: none;
      margin: 0 auto;
      padding-right: 10px;
      max-width: 302px;
      width: 100%;
      line-height: 20px;
      }
      
      @media screen and (max-width: 611px)
      .slideshow-image-post {
      float: none;
      position: relative;
      margin: 0 auto;
      top: 0px;
      left: 0px;
      height: 250px;
      width: 300px;
      text-align: center;
      }
      Mother of God, you solved it! Thank you so much!

      You know, I've been trying to solve this for like a week now
      {{ DiscussionBoard.errors[8618123].message }}
  • Profile picture of the author David V
    Glad I could help!
    {{ DiscussionBoard.errors[8619607].message }}

Trending Topics