Home > Software design >  Is there any way to place a div of specific width and height at a particular point on the screen
Is there any way to place a div of specific width and height at a particular point on the screen

Time:01-12

I have a Image that i made which acts as a place holder for some of the elements in my website and i want the elements to be placed exactly there. Like here

The image that i made

Like in this image how do i place a div of textbox and a button on the board side of the clock exactly there using css and html.

CodePudding user response:

Your can use the position: absolute in your css and with the help of the top, right, left and bottom you can set the perfect position for it

for eg

{
  position: absolute;
  top: 50px;
  left: 0;
}

use this to get the div in center

{
  position: absolute;
  top: 50%;
  left: 50%;
  transfrom : translate(-50%,-50%);
}

Use this for more referance

  • Related