Results 1 to 5 of 5

Thread: (HTML & CSS) Why wont my div display 100%? **Resolved**

  1. #1

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057

    (HTML & CSS) Why wont my div display 100%? **Resolved**

    Why wont my div display 100%?
    Code:
    	 <DIV id="mainContent7" style="POSITION: absolute; Z-INDEX: 1; LEFT:  2mm; TOP: 39mm; WIDTH: 260mm; HEIGHT:120mm;"> 
    <Form id="formName" name="formName">
    <div id="divName" name="divName" style="height:100%; width:100%; color:red;">
    	<SELECT Name=selName style="WIDTH: 225px;"><OPTION VALUE="-1"> </option></SELECT>
    </div>
    </Form>
          </DIV>
    I think I had this happen before and I had to put it in a table that was 100%... but that was cos it was the only thing onthe page.
    any ideas? Can I just go home now?
    Michael
    Last edited by msimmons; Oct 21st, 2002 at 02:11 PM.
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    I thought <div> default was 100%?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771
    You must also make sure that the <form> and <div> have no margins ("margin: 0 0 0 0")

  4. #4
    Fanatic Member punkpie_uk's Avatar
    Join Date
    Sep 2001
    Location
    UK
    Posts
    645
    I think it is. The problem is that the div is contained in the form, and the form is not set to 100%.

    <form style="height:100%; width:100%;">

    Also, do as twanvl said and turn off the form margins for correct displaying.
    SPREAD THE WORD!!! Are You Lee McCormick? Because I Am



    Lee M McCormick
    [email protected]

    Lee McCormick.com - Live
    Dynamically Webbed.com - In development but live

  5. #5

    Thread Starter
    Frenzied Member msimmons's Avatar
    Join Date
    Jul 2001
    Location
    Houston, TX
    Posts
    1,057
    cool thanks. My biggest problem was that I was using "color:red;" to see where the div was rather than "background-color:red;" so no matter that I did I couldn't get it I love when I spend alot of time on something just to find out I am doing something stupid.

    Michael
    I'm off to GalahTech, hope to see you there.

    If you don't like the rules they make, refuse to play their game. -- Steve Ignorant.

Posting Permissions

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



Click Here to Expand Forum to Full Width