- This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
If i have to create a Responsive site. And, in a page we have two elements with fixed width and height lets say 50px x 100px.
From that one element should be placed at the left side, other should be at right side, and both should be vertically center in all devices.
So, please let me know how we can achieve this, is it fine if we use position absolute or fixed in Responsive design.
is it fine if we use position absolute or fixed in Responsive design.
For general layout, relative, fixed or absolute positioning should be avoided…these properties should be used for specific effects only.
From that one element should be placed at the left side, other should be at right side, and both should be vertically center in all devices.
I think I understand what you are asking and it may be that positioning is required in this case but without knowing what you are after more precisely it’s hard to advise.
It may be that there are other techniques that might be more appropriate depending on whether there are other elements on the page.
Do you have a design image of what you are trying to acheieve?
I have created a sample code on CodePen, so please check below link for the structure.
http://codepen.io/sachurp/pen/qdZqNL
Thanks
In this instance, absolute positioning would be ideal for indicators on a carousel/slider of some kind.
In fact it’s a regularly seen solution.
For my mind though, the indicators should be inside the carousel/slider HTML structure.