Login
Remember
Register
References
Ranks
Add reference
CSS - centralize position:fixed element with CSS calc() function
0
votes
294
views
added
Jun 18, 2020
in
CSS
by
lcjr
First Warrant Officer
(
11,990
points)
edited
Dec 18, 2020
by
lcjr
.centralize { width: 984px; position: fixed; right: calc((100% - 984px) / 2); top: 20%; }
css
calc
function
centralize
center
Related reference
CSS - position alignment
CSS - wildcard for attribute, body and use of calc()
CSS - using calc property
Bootstrap - centralize col-md with col-md-offset-
CSS - Background properties
CSS - centralise 3 column items
CSS - vertical align
CSS - horizontal align with flexbox
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
All categories
API
(35)
React
(148)
Javascript
(99)
Next JS
(10)
jQuery
(176)
CSS
(140)
SCSS
(23)
UI design
(1)
Vue
(25)
JSX
(10)
ES6
(8)
Regex
(6)
PHP
(61)
mySQL
(9)
Drupal
(15)
Bootstrap
(22)
Repository
(37)
Software & tools
(38)
Google tools
(28)
Plugins
(13)
Gulp
(9)
NPM
(9)
Node JS
(7)
CMS
(9)
Command-line
(7)
Database
(2)
Domain & hosting
(16)
Elixir
(1)
HTML
(21)
Networking
(4)
Python
(0)
Server issues
(9)
VM & Remote desktop
(2)
VSCode
(6)
Windows
(10)
XSLT
(5)
General
(868)
...