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. Full browser window responsive image or svg

Full browser window responsive image or svg

Scheduled Pinned Locked Moved General Discussion
12 Posts 2 Posters 212 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.
  • A Offline
    A Offline
    aarondawkins
    wrote on last edited by
    #1

    Hi,

    Is it possible to stretch an image or SVG to be full browser height and width? So it warps and is responsive when adjusting the browser window?

    I can make a row full browser height and add an image/svg with a margin. But I can't get it to stretch and go full browser height with CSS.

    Is this possible? Help!

    Thank you.

    Best,
    Aaron

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

      does it have to be a row background image?

      In the gridder, right click on the row and choose "set html class and id". For "html class" enter:

      myrow

      Enter the custom css in "lay options" -> "custom css & html".

      .myrow .background-image.background-image-style-normal img{
          object-fit: fill!important;
      }
      
      1 Reply Last reply
      0
      • arminunruhA Offline
        arminunruhA Offline
        arminunruh
        Global Moderator
        wrote on last edited by
        #3

        and it has to be a browser height row

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aarondawkins
          wrote on last edited by
          #4

          Thanks! That works with an image.

          Can it work with an SVG? Also, it doesn't need to be a row background image ... is there a better way?

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aarondawkins
            wrote on last edited by
            #5

            Also, is it possible to add a padding? Thank you for your help!

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

              sure just try to add the svg as the background does that work?

              with space around maybe this?

              .myrow .background-image.background-image-style-normal img{
                  object-fit: fill !important;
                  top: 20px!important;
                  right: 20px!important;
                  left: 20px!important;
                  bottom: 20px!important;
                  width: calc(100% - 40px)!important;
                  height: calc(100% - 40px)!important;
              }
              

              change values if u like

              the 40px one always has to be left + right (horizontal)

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aarondawkins
                wrote on last edited by
                #7

                Thank you! This all works with an image.

                Doesn't work with a svg tho ... any ideas?

                1 Reply Last reply
                0
                • A Offline
                  A Offline
                  aarondawkins
                  wrote on last edited by
                  #8

                  @arminunruh Sorry, is there a way to get to work with a SVG?

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

                    link? should work with svg too

                    1 Reply Last reply
                    0
                    • A Offline
                      A Offline
                      aarondawkins
                      wrote on last edited by
                      #10

                      Sure, how we go: https://aarondawkins.com/svg/

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

                        hey i dont know why it doesnt work with a svg sorry, maybe its better if you use a jpg

                        1 Reply Last reply
                        0
                        • A Offline
                          A Offline
                          aarondawkins
                          wrote on last edited by
                          #12

                          It's ok! Jpeg is fine, SVG would be great tho. Thank you so much for your help! I appreciate the support.

                          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
                          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