59 users online (1 members and 58 guests)  


  Results 1 to 4 of 4

Related

  1. CSS Image Pop Up - Positioning    Forum: CSS Forum
    Replies: 1
  2. Positioning of image    Forum: HTML Forum
    Replies: 3
  3. Image Positioning    Forum: HTML Forum
    Replies: 4
  1. #1
    svoltmer's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    9

    Question Positioning Text over a Bkrnd Image

    Hello,
    I have been banging my head trying to figure out why I can't center the words "HOME" over the background-image "home_butt.gif" for the past 2 hrs. Could you please take a look at the page (left frame) and see what you think Is causing problems? Thanks alot!!
    It displays differently in IE 6 and NS 7. Both not centered.

    http://www.home.earthlink.net/~svoltmer

  2. #2
    cssangel's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2003
    Posts
    1
    vertical-align is the property to use but as it will only set the vertical alignment on the lineheight of the element it is contained in. You should set the height of your#homebutton div as line-height: 35px, than you can add
    vertical-align: middle;

    e.g.
    Code:
    #homebutton {
    display: block;
    /* height: 35px; */
    width: 90px;
    font-size:9pt;
    text-align: center;
    text-decoration: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent
    url(images/home_butt.gif)
    center center no-repeat;
    border: 1px solid blue;
    line-height: 35px;
    vertical-align: middle;
    }
    Last edited by cssangel; 06-02-2003 at 04:00 PM.

  3. #3
    svoltmer's Avatar
    New User

    Status
    Offline
    Join Date
    May 2003
    Posts
    9
    Thank you!! You are the answer to my prayer! Iam tellin' you there is no where that I can find good documentation on what each property does for each tag (object). The line-height is a great solution, but I could never find out what it was for. Is there any sites that are specific for somone who is learing CSS?

  4. #4
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    http://css.somepeople.net
    http://css.somepeople.net/cssref
    http://css.somepeople.net/css2ref

    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?



Tags for this Thread