Image fixed to center
-
So I'm having a hard time figuring out how an element (text/image/caroussel/whatever) can be fixed to the center of the page.
Is there a way to fix an element to the center? So which ever way you drag the browser it will remain in the middle.
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. Setting the bottom % works counter intuitively - it adds more space.
Cheers!
-
Dear @mrl_money
"Is there a way to fix an element to the center? So which ever way you drag the browser it will remain in the middle."
Using CSS to achieve a 'fixed' element is likely the best choice, unsure of your design needs.
An element can be targeted with CSS by attributes that it may have, most commonly a Class or ID.
Example HTML:
<div class="this-elements-class"> <div id="this-elements-id"> </div> </div>
Say we want the outer <div> to have a fixed position, we could target it with CSS and apply some rules to it:
.this-elements-class{ position:fixed; }
Or if we wanted to target the nested (inner) <div> :
#this-elements-id{ position:fixed; }
With CSS we use an ' . ' for Class and a ' # ' for ID.
Any Custom CSS can be applied to your Laytheme site via:
Lay Options > Custom CSS & HTML > Custom CSS
Or:
Customize > CSS
Hope this helps you in the right direction @mrl_money & have a wonderful day 🌞
Sincerely
Richard
-
Dear @mrl_money
Could you please post a link to your website and i can take a better look 🌝
Best Wishes
Richard
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- 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:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it