WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Slide IMG Position Correct on Desktop BUT Wrong on Mobile Devices (5 posts)

  1. realtydesignstudio
    Member
    Posted 1 year ago #

    When I view my homepage from my desktop browser the slide image is correctly centered, but when I view my homepage on my iPad or Android phone the slide image width becomes narrow and is positioned to the left. I'm using the "D5 Business Line" theme. The default code in the stylesheet "style.css" is...

    #slide img {
    border: 1px solid #C9C5C5;
    box-shadow: 0 -1px 5px 0 #E0E0E0;
    height: 400px;
    width: 1050px;
    border-radius:10px;
    -moz-border-radius:10px;
    -webkit-border-radius:10px;
    position: absolute;
    }

    One thing I did try was changing the position from "absolute" to "center" and then the slide image did appear correctly on the mobile devices just as the desktop. Unfortunately, when the second slide image appeared it was displayed near the bottom of the page.

    How do I position the slide images to be correctly displayed centered on the desktop and mobile devices?

    My homepage is http://www.realtydesignstudio.com/

  2. Andrew
    Forum Moderator
    Posted 1 year ago #

    You just need to override its max width CSS property.

  3. realtydesignstudio
    Member
    Posted 1 year ago #

    What is the code for that, or rather what should it look like?

    Thanks in advance.

  4. Andrew
    Forum Moderator
    Posted 1 year ago #

    Do you have a section of the dashboard named, "Custom CSS" or "Edit CSS"?

  5. realtydesignstudio
    Member
    Posted 1 year ago #

    Excellent, I changed "width: 1050px" to "max-width: 1050px" and it solved the problem. Thank you for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic