Hi everyone.
I wanted my "div" to move down to the vertical middle of my page but it doesn't do so. It stays solid
at the top of the page ! This is the code:
Either i add: "position:relative" or not, the div remains at the same place. If i use "px" rathet then "%" it moves down but i need "%" because otherwise, in various display resolutions that div will be placed in various locations.Code:<style type="text/css"> div#startpage { width:960px; height:495px; margin:0; padding:0; border: solid 2px red; /*position:relative;*/ top:50%; </style> </head> <body> <div id="startpage"></div> </body> </html>
Any idea how to make a div "move" using CSS?
Thanks !



Reply With Quote

Bookmarks