I am creating a responsive website, but I've a problem with the positions, when I convert the top property or the left/right property the position is not exactly equal at the pixel equivalent. Why?
e.g. I've top -250px and left -250px, I want transform the two properties in percentual and the result is ~-18% but still not working T.T
Can we have your full HTML+CSS of that page ?
This is a snippet of my HTML
and this is the css:
<h1>space web design</h1>
width: 32.94289897510981%; /*450*/
font-family: 'null', sans-serif;
margin: 0 auto;
top: -18.30161054172767%; /* -250 / 1366 */
left: -18.30161054172767%; /* -250 / 1366 */
I appears that your hgroup is centered on the page and your nav is off-center to the left below the header. Is this what you intended?
Note that if this is a responsive site, then you'll want to change the font size from pixels to a percentage like you do with the hgroup, otherwise it breaks out of the header when resized smaller.
It's not really clear what you want to do. Percentages are not the same as pixels, period.
Perhaps set the body to
width: 100%;. Percentage is relative to the parent element, sometimes it acts up when it doesn't have a reference of the parent element's width.