Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Vertical Centering

  • 04-01-2005 7:40am
    #1
    Registered Users, Registered Users 2 Posts: 885 ✭✭✭


    Hi just a quick one. I am looking to center a simple image vertically to display loading while the page loads nomatter what the users resolution is but am finding it hard to do. Can anyone explain how to do this.

    Thanks
    John.


Comments

  • Registered Users, Registered Users 2 Posts: 6,571 ✭✭✭daymobrew


    table width=100% height=100%
    One row with one cell
    td valign=center align=centre
    img in the one cell.


  • Closed Accounts Posts: 7,488 ✭✭✭SantaHoe


    Create a 1x1 table of 100% height and 100% width, then use center alignment for both horisontal and vertical for content within the table.

    Snippet...
    <table style="width: 100%; height: 100%;" border="0">
    <tbody>
    <tr>
    <td style="text-align: center; vertical-align: middle;"><img src="blah.jpg"><br>
    </td>
    </tr>
    </tbody>
    </table>
    


  • Registered Users, Registered Users 2 Posts: 885 ✭✭✭clearz


    Thats what I was trying. When I took out the DOCTYPE tag at the top it worked. ???

    tnx


  • Closed Accounts Posts: 2,525 ✭✭✭JustHalf




Advertisement