View Full Version : Input inside a div

05-24-2010, 05:36 AM
Hey first time poster, bare with me, but i have a really annoying problem. I just can not get my <input> tag to work inside a <div>...or anything other than my <body> really. But only in chrome and others, IE it works fine. I'm going to post all my code(sorry if thats a no no). It validates under xhtml strict so i'm guessing its not syntax. Also just as a note, it's not my assignment, i'm attempting to do a university assignment of which i don't attend.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>Attempt at assignment</title>
<script type ="text/javascript" src="myjs.js"></script>
<link rel="stylesheet" type="text/css" href="mystyle.css" />
<ul id="navlist">
<li id="home"><a href="home.html"></a></li>
<li id="order"><a href="order.html"></a></li>
<li id="scart"><a href="scart.html"></a></li>
<div id="ex">
<img id="logo" src="billbolt.bmp" alt=""/>
<div id="content">
<div id="bolt" ></div>
<div id="nut" ></div>
<div id="washer" ></div>
<div id="quantity">
<form action="">
<label for="boltQTY">QTY:</label>
<input type="text" id="boltQTY" name="boltQTY" size="5"/>


05-24-2010, 05:42 AM
you should post your css.

05-24-2010, 05:49 AM
I've removed all my css and javascript in this case to eliminate them as problems. Well, i removed it on the "quantity" div. Is it likely the rest of my css is effecting it? I don't think you want to see it :D. It's unnecessaly repeditive at the moment, so its about 120 lines. Ill be fixing that later.

05-24-2010, 06:22 AM
The code "worked" for me (meaning an input box appeared and I could type in it). Tried it with Firefox and even IE6.

05-24-2010, 06:23 AM
Balls!!!! It was my z-index in my css. Thanx dude.