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 5 of 5
  1. #1
    Regular Coder
    Join Date
    May 2010
    Location
    Bathurst, Australia
    Posts
    180
    Thanks
    1
    Thanked 22 Times in 22 Posts

    Input inside a div

    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.
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    	<head>
    		<title>Attempt at assignment</title>
    		<script type ="text/javascript" src="myjs.js"></script>
    		<link rel="stylesheet" type="text/css" href="mystyle.css" />
    	</head>
    	<body>
    		<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>
    		</ul>
    		<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"/>
    					</form>
    				</div>
    			</div> 
    		</div>
    		
    	</body>
    </html>

  • #2
    Regular Coder seco's Avatar
    Join Date
    Nov 2008
    Location
    Oregon
    Posts
    687
    Thanks
    6
    Thanked 79 Times in 77 Posts
    you should post your css.

  • #3
    Regular Coder
    Join Date
    May 2010
    Location
    Bathurst, Australia
    Posts
    180
    Thanks
    1
    Thanked 22 Times in 22 Posts
    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 . It's unnecessaly repeditive at the moment, so its about 120 lines. Ill be fixing that later.

  • #4
    New Coder
    Join Date
    Nov 2009
    Location
    Portland Oregon
    Posts
    33
    Thanks
    0
    Thanked 6 Times in 6 Posts
    The code "worked" for me (meaning an input box appeared and I could type in it). Tried it with Firefox and even IE6.

  • #5
    Regular Coder
    Join Date
    May 2010
    Location
    Bathurst, Australia
    Posts
    180
    Thanks
    1
    Thanked 22 Times in 22 Posts
    Balls!!!! It was my z-index in my css. Thanx dude.


  •  

    Posting Permissions

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