Hi,
I don't know much about web app dev, and I want to make make a div always showing on the left most side of the browser window, like the red 'feedback' of user voice, would you give me some hints? thanks!
Hi,
I don't know much about web app dev, and I want to make make a div always showing on the left most side of the browser window, like the red 'feedback' of user voice, would you give me some hints? thanks!
Try this:
div#mydiv {
position: fixed;
left: 0;
}
You'll probably want to add top
or bottom
to that as well so that it doesn't sit at the top of the screen.
Something like:
div#mydiv {
position: fixed;
left: 0;
top: 200px; /* 200px from top */
}
or:
div#mydiv {
position: fixed;
left: 0;
bottom: 200px; /* 200px from bottom */
}
or:
div#mydiv {
position: fixed;
left: 0;
top: 50%; /* Half way down the side */
}
set its position
to fixed
and its left
to 0px
#fixedLeft{
position:fixed; /* now it will stay fixed on the screen, even while you scroll*/
left:0px; /* it will be stuck to the left*/
top:50%; /* it will be in the middle (vertically)*/
}