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
    New Coder
    Join Date
    Sep 2011
    Location
    Bournemouth
    Posts
    20
    Thanks
    3
    Thanked 0 Times in 0 Posts

    CSS Min Height Problems

    Hello,

    Two questions, The first is that I am struggling to get my head round making the min-height work on my page. My page is at http://www.garethgroup.com/test/floa...mpt/index.html. This is not a commercial website but more of a website of attempted collaborations.

    I am also wondering if there is a quicker way of opening divs - for example, can you use div id's like this -

    Code:
    <div id="div1" "div2" "div3">

    Thanks and Kind Regards,

    Ben.

  • #2
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,335
    Thanks
    5
    Thanked 363 Times in 360 Posts
    I have no idea what you're asking in either of your.... questions??

    min-height should work how? Whats NOT working in your page? What do you WANT it to do?


    A div must be <div></div> that's it. You must have an opening div tag and a matching closing div tag for each element. If that's what you're asking. Again, you need to be more descriptive.
    Teed

  • #3
    Regular Coder
    Join Date
    Jul 2011
    Location
    India
    Posts
    496
    Thanks
    3
    Thanked 57 Times in 56 Posts
    I think your issue is with IE regarding min-height. Following is cross browser code for this issue:

    Code:
    .class {
    min-height: 400px;
    height:400px;
    height:auto !important;
    }

    What you mean by quicker way???

  • #4
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,724
    Thanks
    41
    Thanked 191 Times in 190 Posts
    to add more specifically to Teed's answer you can only have one ID per element per page... ie you cannot have two divs named (for example) id="one" and you cannot have multiple ID's as per your example. If you are doing this because you are trying to assign multiple "styles" you CAN have multiple classes for one element example
    let's say we have three classes; .one{} .two{} .three{}.
    this is valid
    Code:
    <div id="main" class="one two three"></div>
    note that this is invalid
    Code:
    <div id="main" class="one" class="two" class="three"></div>
    just like the id you can only declare one class section but you can have multiple classes defined in that section (idk what the "proper" terminology for it is... class attribute? parameter? etc)
    As with Teed though kinda unclear what you are driving at

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE


  •  

    Tags for this Thread

    Posting Permissions

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