HabboxWiki needs you!
Are you a Habbo buff? Or maybe a rare trader with a bunch of LTDs? Get involved with HabboxWiki to share your knowledge!
Join our team!
Whether you're raving for rares, excited for events or happy helping, there's something for you! Click here to apply
Need a helping hand?
Check out our guides for all things to help you make friends, make rooms, and make money!


Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2008
    Posts
    3,744
    Tokens
    2,116
    Habbo
    iBlueBox

    Latest Awards:

    Default HTMl / css Image help.

    Pretty new to html / css and all that, but basically.


    I have an image on my site, and I want the image in the centre of the page, how do I go about doing this?




  2. #2
    Join Date
    Jun 2009
    Location
    Newcastle Upon Tyne, UK
    Posts
    2,652
    Tokens
    702
    Habbo
    lRhyss

    Latest Awards:

    Default

    <div align="center"><img href="IMAGE LINK"></div>

  3. #3
    Join Date
    Feb 2013
    Posts
    2,534
    Tokens
    13,046

    Latest Awards:

    Default

    Quote Originally Posted by lRhyss View Post
    <div align="center"><img href="IMAGE LINK"></div>
    Yes this or you can make a CSS class and have the div be a class. That's a slightly better way of doing it

  4. #4
    Join Date
    Dec 2008
    Posts
    3,744
    Tokens
    2,116
    Habbo
    iBlueBox

    Latest Awards:

    Default

    Quote Originally Posted by lRhyss View Post
    <div align="center"><img href="IMAGE LINK"></div>
    Thanks!

    Just wondering,

    Say If I want 3 images in a row next to each other, how would I do that?




  5. #5
    Join Date
    Feb 2013
    Posts
    2,534
    Tokens
    13,046

    Latest Awards:

    Default

    Quote Originally Posted by iBlueBox View Post
    Thanks!

    Just wondering,

    Say If I want 3 images in a row next to each other, how would I do that?
    <div align="center"><img href="IMAGE #1 LINK"><img href="IMAGE #2 LINK"><img href="IMAGE #3 LINK"></div>


    Or as I said above, substitute align for class as appropriate.

    Take a look at this
    http://www.w3schools.com/html/default.asp

  6. #6
    Join Date
    May 2007
    Posts
    10,481
    Tokens
    3,140

    Latest Awards:

    Default

    <style>
    img.center {
    display: block;
    margin: 0 auto;
    }
    </style>
    <img class="center" src="http://myawesomeimage.com/image.png" />

    Is the preferred way to do it. The div tag's align attribute is not supported in HTML5.
    Chippiewill.


  7. #7
    Join Date
    Mar 2005
    Location
    Bristol
    Posts
    5,640
    Tokens
    11,359
    Habbo
    djclune

    Latest Awards:

    Default

    Quote Originally Posted by Chippiewill View Post
    <style>
    img.center {
    display: block;
    margin: 0 auto;
    }
    </style>
    <img class="center" src="http://myawesomeimage.com/image.png" />

    Is the preferred way to do it. The div tag's align attribute is not supported in HTML5.
    This is the best way to do it...
    That's when Ron vanished, came back speaking Spanish
    Lavish habits, two rings, twenty carats

  8. #8
    Join Date
    Dec 2004
    Location
    England
    Posts
    1,916
    Tokens
    7,717
    Habbo
    maken

    Latest Awards:

    Default

    Quote Originally Posted by iBlueBox View Post
    Pretty new to html / css and all that, but basically.


    I have an image on my site, and I want the image in the centre of the page, how do I go about doing this?
    I see someone has helped you, for loads more ideas and help visit w3schools.org



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •