Align a div to the right of another and have it look the same regardless of screen size

Viewed 34

I'm stuck on this and I'd like to align a div to the right of another without messing with the width or height preferably. Here's an image. I'd like the notation note right next to the equation. Here's what I tried (CSS code):

#rec-nb
{
   position: relative; 
}

#rec-ic
{
    position: absolute;
    right:400px;
    top:515px;
}

The issue is: This is fine on my PC screen, however on my MacBook, it's messed up and is on top of the equation. Any ideas?

EDIT: Fixed. It was an indent problem. Now it looks fine with the code I have.

1 Answers

maybe use vw(viewport), cmiiw

example : margin-right: 20vw;
Related