Last post Nov 01, 2016 04:18 AM by KathyW
Oct 31, 2016 03:51 PM|JAYHAWKER|LINK
I can place three divs, and have the middle centered if I the widths of the one on the right and the one on the left are the same. But how do I keep the one in the middle centered if the left and right divs are different widths? I can make it stay centered
if I set the centered one's positioning to "absolute", but anything else, and it moves
Nov 01, 2016 02:43 AM|Deepak Panchal|LINK
you can try to used fixed position.
margin-top: -9em; /*set to a negative number 1/2 of your height*/
margin-left: -15em; /*set to a negative number 1/2 of your width*/
border: 1px solid #ccc;
Nov 01, 2016 04:18 AM|KathyW|LINK
Can you clarify what you mean by "centered" if the divs on each side are not the same width? Centered in relationship to what? Seeing your page - current HTML and CSS - would make this easier.