Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1469430

    Hi,
    i have set my page to 1460px but the #main content should be 1040px and center (only main not header).

    #main .avia-section {width:1040px; 
    display: block;
        float: none;
        clear: both;
        text-align: center;
      }

    …but it stuck always left .. any ideas?

    center-page

    • This topic was modified 1 month ago by xeovision.
    #1469433

    Hey Sebastian,
    Please link to your page so we can examine.

    Best regards,
    Mike

    #1469441

    Thx MIke .. i found a solution that set it to the middle

    #main .avia-section {width:1080px; display: block; float: none;
    margin: 0 auto;  }

    But now, the mobile view does not work, when i delete the float:none .. it jumps again to the left

    • This reply was modified 1 month ago by xeovision.
    • This reply was modified 1 month ago by xeovision.
    #1469468

    Hi,
    I checked the six pages from your backend but still don’t see it, if the above works try adding a media query so it will only work on tablets and desktop, like this:

    @media only screen and (min-width: 768px) { 
    #main .avia-section {width:1080px; display: block; float: none;
    margin: 0 auto;  }
    }

    or adjust the min-width larger to suit.

    Best regards,
    Mike

    #1469502

    oh man .. as simple as it is :)
    Thx for the hint

    so, we can close here

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Center smaller #main by css’ is closed to new replies.