First off, yes I read the FAQs, scoured the internet for solutions, etc. I also found several solutions to this problem, however I have not been able to get any of them to work. I'm a CS student at a university, but have very little experience with web development, so I decided to build a website for myself from scratch to get some hands on experience.
Here is the problem: I need to put 2 div tags side by side. Float:left, clear:both, and any number of other solutions I have found though google have failed me. I feel like I have to be missing something incredibly elementary, but these tags will not sit next to each other.
Code:
<html>
<body>
<div style = "width: 100%;">
<div stlye = "width: 10%; float:left;">
Name:<br>
Comment:
</div>
<div style = "width: 70%; float:left;">
<form action = "comment.php" method = "post">
<input type = "text" name = "name" size = "57">
<input type = "submit" value = "submit"><br>
<textarea cols = "50" rows = "6" name = "comment"></textarea>
</form>
</div>
<div style = "clear:both;"></div>
</div>
</body>
</html>
As you can see, I've tried making the 2 div tags smaller than 100% width in an effort to make them fit on the same line, added a "clear:both" div tag as indicated by several forum posts on other websites, and this is still the end result.
I apologize in advance if I come off sounding ungrateful or snobbish; I'm just feeling like an idiot right now because I can't figure out how to get something so simple to work properly.
|