How to define a measurement in screen pixels with CSS?

JavascriptWeb DevelopmentFront End Scripts

To define a measurement in screen pixels with CSS, use the px unit.

Let us see an example:

<html>
   <head>
   </head>
   <body>
      <div style = "position:relative;left:90px;top:3px;background-color:yellow;">
         This div has relative positioning.
      </div>
   </body>
</html>
raja
Published on 13-Apr-2018 10:27:46
Advertisements