Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts

    min-height attribute does not work

    I have a min-height on a div in my css. The only time it will work is when i take off the attribute "display:table-cell;"

    Is there a way around this?

    Code:
    .agent_info {
    width: 600px;
    padding: 20px;
    border-bottom: 1px solid #000;
    overflow: hidden;
    text-align: left;
    display: table-cell;
    vertical-align: middle;
    min-height: 170px;
    margin-left: 100px;
    }

  • #2
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    I don't know a workaround, but i'd really like to know why you need to display it as a table-cell?

  • #3
    Senior Coder jcdevelopment's Avatar
    Join Date
    Oct 2007
    Location
    Cowboy Nation
    Posts
    2,179
    Thanks
    174
    Thanked 257 Times in 257 Posts
    to my understanding, it needs to be that way so you can vertically align your text in a div. Is there a work around for that?

  • #4
    Regular Coder
    Join Date
    Jan 2009
    Posts
    173
    Thanks
    5
    Thanked 12 Times in 11 Posts
    As far as i know, that's the only way with CSS. I'm sure there are some javascript hacks for this, if that's an option for you? But may i ask why you need a minimum height on a table cell? Could you post the entire source code?


  •  

    Posting Permissions

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