Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2017
    Location
    Milwaukee, WI
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Imaging issues with Mobile

    -screenshot-jpg

    This is a screenshot of my website from my mobile device. This is my aside and for some reason, the picture is not centered and I don't know why. Below is my mobile CSS:

    Code:
      #sidebar {
        width: 100%;
        float: none;
        text-align: center;
        
        }
        
        #sidebar img {
        display: block;
        text-align: center;
         width: 300px; 
        height: 200px;
        padding: 5px;
        margin: auto;
        }

    When I change the width to 200px, the text starts on the same line as the picture, even though the text is in an h2 tag. Can someone help me out?

    Thank you!
    Last edited by vinyl-junkie; 09-14-2017 at 03:20 AM. Reason: added code tags

  2. #2
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    7,303
    Thanks
    31
    Thanked 989 Times in 986 Posts
    Have you tried the background-position: center; style?
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  3. #3
    New to the CF scene
    Join Date
    Sep 2017
    Location
    Milwaukee, WI
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by sunfighter View Post
    Have you tried the background-position: center; style?
    Yes, doesn't affect the image at all.

  4. #4
    Master Coder sunfighter's Avatar
    Join Date
    Jan 2011
    Location
    Washington
    Posts
    7,303
    Thanks
    31
    Thanked 989 Times in 986 Posts
    Post all your code HTML/CSS here please or a link to your site.
    Evolution - The non-random survival of random variants.
    Physics is actually atoms trying to understand themselves.

  5. Users who have thanked sunfighter for this post:

    jgwianecki (09-14-2017)

  6. #5
    New to the CF scene
    Join Date
    Sep 2017
    Location
    Milwaukee, WI
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •