Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

css calc margin-top based on height?

/*with margin-top the % is relative to width of parent element (kinda silly)
you can use top:50% which will be relative to height of the parent element*/
.my_element{
  top:50%
  position:relative;
}
 
PREVIOUS NEXT
Tagged: #css #calc #based
ADD COMMENT
Topic
Name
8+4 =