Pergunta

Need to display Update Progress at the center of a Grid view placed in a Ajax Update Panel. Is there a way to place the Update progreass control at the center of the grid view (or else center of the page) with CSS (without using jQuery or Java Script)?

Foi útil?

Solução

Put the grid-view and update progress html within a wrapper div. Position div relatively and position the update progress absolutely at center.

See this jsfiddle that I have set up: http://jsfiddle.net/DDdyU/

key styles are

.wrapper
{
    position: relative;
}
.updateProgress
{
    position:absolute;
    top: 50%;
    left: 50%;
    margin-left: -50px;
    margin-right: -20px;
}

negative margins are half size of update-progress.

Outras dicas

Not with just pure CSS unless you absolutely position the UpdateProgess div in the middle of the GridView. I feel like jQuery would be cleaner if you can use it in your application.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top