...

View Full Version : Problem with nested div elements



aatwo
02-08-2007, 01:12 AM
This has given me a rather large headache. I have the following code in my web page.

Here is a link to my web page or you can view the isolated code below.
http://www.aatwo.com/admin/submitNews.php

html code


<div id="content">
<div id="submitNewsForm">
<form name="newsForm" action="newsSubmit.php" method="post" enctype="multipart/form-data">
<p>
Username:
<input name="username" type="text">
</p>
<p>
Password:
<input name="password" type="text">
</p>
<p>
Article Name:
<input name="articleName" type="text">
</p>
<p>
Article:
<textarea name="article"></textarea>
</p>
<p>
Image (220x80):
<input name="image" type="file">
</p>
<input name="currentDate" id="currentDate" type="hidden">
<input name="modifyDate" id="modifyDate" type="hidden">
<input type="button" value="Submit" onclick="obtainDate();">
</form>
</div>
</div>


css code


#content {
background-image: url('http://www.aatwo.com/images/template/original/bodyMiddle.png');
background-repeat: repeat-y;
}
#submitNewsForm {
width: 500px;
background: green;
}



Why does the div tag with the id 'submitNewsForm' refuse to allow any form of styling to be applied to it? As you can see on my site, all it does is cover the content element with a black white background.

aatwo
02-08-2007, 01:17 AM
Gar nvm. honest to god this has not been working until the second I posted this thread. it seems to have started to work now for no reason. I never even changed any of my code :s

Excavator
02-08-2007, 02:01 AM
Hello again aatwo,
Did you look at this in FF? #submitNewForm needs positioned... like this maybe:

/* End footer content */
/* Submit news form */
#submitNewsForm {
width: 500px;
background: green;
margin: 0 auto;
}/* End submit news form */

aatwo
02-08-2007, 07:42 PM
Thank you once again Excavator.

The primary reason for the page remaining in a single state despite how much I changed the css file was all down to me defining the css file link in the web pages header to be an absolute address. And so of course it was was using the same css file all along (the one on my server rather than the one on my hard disk).

A sure sign of insomnia -_-



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum