|
-
Oct 18th, 2002, 01:44 PM
#1
Thread Starter
Frenzied Member
(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.
-
Oct 19th, 2002, 10:44 AM
#2
Stuck in the 80s
I thought <div> default was 100%?
-
Oct 20th, 2002, 04:41 PM
#3
You must also make sure that the <form> and <div> have no margins ("margin: 0 0 0 0")
-
Oct 21st, 2002, 06:31 AM
#4
Fanatic Member
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.
-
Oct 21st, 2002, 10:04 AM
#5
Thread Starter
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|