Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7

Thread: absmiddle

  1. #1
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    What is the XHTML-compliant version of:
    Code:
    <img src="..." width="..." height="..." align="absmiddle" />
    i.e., what is the CSS for absmiddle?
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  2.  

  3. #2
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    Code:
    text-align: center;
    vertical-align: middle;
    ?
    JR

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Thanks, seems to work.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Senior Member jlgosse's Avatar
    Join Date
    Jan 2004
    Location
    Newfoundland, Canada
    Posts
    1,037
    Member #
    4570
    Liked
    7 times
    Hey, could you consider that a hack? I was assuming something like that would work myself.


  6. #5
    JR
    JR is offline
    Senior Member JR's Avatar
    Join Date
    Nov 2002
    Location
    UK
    Posts
    4,354
    Member #
    257
    text-align is the only real way you can align something to center using CSS (yes, go on you CSS positioning experts, prove me wrong). I don't know why they called it "text-align", I guess they shoulda just called it 'align' or 'horizontal-align'.
    JR

  7. #6
    Senior Member Riat_Sila's Avatar
    Join Date
    Oct 2003
    Location
    Berkshire, UK
    Posts
    417
    Member #
    3485
    Yeah, it's just all the browsers align everything inheriting the text-align's value rather than just the text.

  8. #7
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    Although its more complicated you can do this instead:

    Code:
    element {
     position: absolute;
     width: 300px;
     height: 400px
     left: 50%;
     top: 50%;
     margin-left: -150px;
     margin-top: -200px;
    proved JR wrong..



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:22 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com