Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #400076

    Hi there!

    For two pages I made a layout in 3 x 1/3. I placed only text in the middle section: a centered subtitle and left-aligned bodytext.
    I want this left-aligned text to align correctly with the centered subtitle, so gave the left-aligned text:
    – padding-left 92px for page A
    – padding-left 30px for page B

    Made these paddings in page editor, not in custom css. It only looks OK for desktop now.
    Which coding is necessary to get this left-aligned text to look good on desktop as well for tablet and mobile phone?

    Regards,
    Me.llamo

    #400457

    Hi Me.llamo!

    Does the text block have to be aligned to the left? If not, the easiest option would be to add a 1/1 instead of 3×1/3 and just center the text in the 1/1. Would that work for you?

    Best regards,
    Rikard

    #400548

    Hi Rikard,

    Yes that’s the easiest way, but I don’t fancy that alignment for these two specific blocks.

    If you will only provide me a code (incl. post-id) and the right mediaquerie, I will figure out myself which padding or margin I need for all mobile and tablet device. I’m just a beginner ;-)

    Or is it easier 1/1 and then give these 2 left-ligned blocks a huge padding 250px or something in that range?
    It probably will make no difference for the outcome?!

    Best regards,
    Me.llamo

    #401145

    Hey!

    For the first link use this code:
    For iPad portrait mode:

    @media screen and (max-width: 768px) {
    .page-id-18 .avia_textblock {
    margin-left: -78px;
    }}
    

    Adjust “max-width” for media query and “margin-left” as needed.

    You can right click on chrome or firefox and select inspect element to find page-id:

    Regards,
    Andy

    #401433

    Hi Andy,

    Thanks, but after several refreshments it still doesn’t respond to this code at all.

    Could you also please take a look at the sidebar? It suddenly stops at the bottom seeing it on a laptop.

    Regards,
    Me.llamo

    • This reply was modified 9 years, 8 months ago by Me.llamo.
    #402023

    Hey!

    Please add following code to Quick CSS as well

    .html_stretched #wrap_all {
    background-color: #262626;
    }

    and please try adding !important rule to Andy’s code as following

    @media screen and (max-width: 768px) {
    .page-id-18 .avia_textblock {
    margin-left: -78px !important;
    }}

    Cheers!
    Yigit

    #402372

    Hi there!

    The first code (.html–stretched…) looks well now on a laptop. Thumbs up!
    Did not look well for larger screens, but gave every page more whitespace at the bottom and that worked out.

    The second code seems to work too…..I am testing it now….

    • This reply was modified 9 years, 8 months ago by Me.llamo. Reason: it works after all
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Margin left not looking good in responsive mode’ is closed to new replies.