Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. image in center and middle

image in center and middle

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 134 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    Wynz
    wrote on last edited by
    #1

    Hey,

    i want to put an image in the center of a website. Been playing around with Frame tool. But that will only allow me to set a fixed height that pushes the image to the center-ish.

    So far I gave the image the custom CSS-ID "center" and put this in the CSS-Code:
    #center {
    width: 50%;
    position: absolute;
    top: 50%;
    bottom: 50%;
    left: 50%;
    right: 50%;
    }

    Put this does not work … The image is somehow pushed to the right side!?

    Any ideas how to fix this (simple) problem?

    Best
    Fabian

    1 Reply Last reply
    0
    • W Offline
      W Offline
      Wynz
      wrote on last edited by
      #2

      @arminunruh any idea?

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        ynnckmllr
        wrote on last edited by
        #3

        Following

        1 Reply Last reply
        0
        • arminunruhA Offline
          arminunruhA Offline
          arminunruh
          Global Moderator
          wrote on last edited by
          #4

          create a page. set frame top and bottom to 0
          right click the row. click "use browser height for row height"
          then place an image in the center

          why do you want to use custom css for this?

          your custom css may work if you use !important; for everything. not sure.
          like: left: 50%!important;
          however, the width of the element depends on grid css css which doesn't use width: 50%; you need to inspect the element using your browser inspector, look at the css that is being applied and this way you can see why it's not working. because you'll see which css overwrites your css.

          you can post a link here so i can help you with this if you like.

          1 Reply Last reply
          0
          • arminunruhA Offline
            arminunruhA Offline
            arminunruh
            Global Moderator
            wrote on last edited by
            #5

            and sorry about the late reply!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            I also code custom websites or custom Lay features.
            šŸ’æ Email me here: šŸ’æ
            info@laytheme.com

            Before you post:
            1. When using a WordPress Cache plugin, disable it or clear your cache.
            2. Update Lay Theme and all Lay Theme Addons
            3. Disable all Plugins
            4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

            This often solves issues you might run into

            When you post:
            1. Post a link to where the problem is
            2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
            3. If the problem is difficult to explain, post screenshots / link to a video to explain it
            Online Users
            A
            alasdair17
            M
            MATTOFIRE
            M
            matejmoravec
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search