Russia Posted November 7, 2009 Share Posted November 7, 2009 I have tried everything tp align a textbox. Here is what I am having trouble with. This is a picture of what I need --- <span style="float: left;"> Main News Message: </span> <textarea class="theform" name="mainnewsmessage" cols="40" rows="5">You may recognize the Poison Arrow pub and the aquanite from our Guaranteed Content polls. Everything in the Poison Arrow came from in-game suggestions and the forums. And thats not all: beware of aquanites...</textarea> <hr> and the css: <style type="text/css"> input.theform { border:solid 1px #675f39; padding:4px 2px; } textarea.theform { border:solid 1px #675f39; padding:4px 2px; [b]align: right;[/b] } </style> Quote Link to comment Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Share Posted November 7, 2009 <textarea class="theform" name="mainnewsmessage" cols="40" rows="5">blahblahblah</textarea> I'm not sure this is connected to the style.. Post an example of the style and html for a textbox that is aligned to the right. So we can compare differences. Check out my thread.. (Y) Quote Link to comment Share on other sites More sharing options...
Russia Posted November 7, 2009 Author Share Posted November 7, 2009 Okay, here you go: <span style="float: left;"> Second News Message: </span> <span style="float: right;"> <textarea class="theform" name="secondnewsmessage" cols="40" rows="5">Hola! Were pleased to announce that we have just released the game and website in its fourth language: Brazilian Portuguese.</textarea> </span> <br> <br> <br> <br> <br> <br> <br> <hr> Quote Link to comment Share on other sites More sharing options...
Russia Posted November 7, 2009 Author Share Posted November 7, 2009 Sorry here you go: Here is my whole form: <form AUTOCOMPLETE = "off" action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post"> <span style="float: left;"> Website Title: </span> <span style="float: right;"> <input class="theform" size="40" name="title" value="<?php echo $row['title']; ?>"> </span> <br><br> <span style="float: left;"> Website Url/Link: </span> <span style="float: right;"> <input class="theform" size="40" name="url" value="<?php echo $row['url']; ?>"> </span> <br><br> <hr> <span style="float: left;"> Main News Title: </span> <span style="float: right;"> <input class="theform" size="40" name="mainnewstitle" value="<?php echo $row['mainnewstitle']; ?>"> </span> <br><br> <span style="float: left;"> Main News Date: </span> <span style="float: right;"> <input class="theform" size="40" name="mainnewsdate" value="<?php echo $row['mainnewsdate']; ?>"> </span> <br><br> <span style="float: left;"> Main News Image: </span> <span style="float: right;"> <input class="theform" size="40" name="mainnewsimage" value="<?php echo $row['mainnewsimage']; ?>"> </span> <br><br> <span style="float: left;"> Main News 'Read More' link: </span> <span style="float: right;"> <input class="theform" size="40" name="mainnewslink" value="<?php echo $row['mainnewslink']; ?>"> </span> <br><br> <span style="float: left;"> Main News Message: </span> <textarea class="theform" name="mainnewsmessage" cols="40" rows="5"> <?php echo $row['mainnewsmessage']; ?> </textarea> <hr> <span style="float: left;"> First News Title: </span> <span style="float: right;"> <input class="theform" size="40" name="firstnewstitle" value="<?php echo $row['firstnewstitle']; ?>"> </span> <br><br> <span style="float: left;"> First News Date: </span> <span style="float: right;"> <input class="theform" size="40" name="firstnewsdate" value="<?php echo $row['firstnewsdate']; ?>"> </span> <br><br> <span style="float: left;"> First News Message: </span> <span style="float: right;"> <textarea class="theform" name="firstnewsmessage" cols="40" rows="5"><?php echo $row['firstnewsmessage']; ?> </textarea> </span> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <hr> <span style="float: left;"> Second News Title: </span> <span style="float: right;"> <input class="theform" size="40" name="secondnewstitle" value="<?php echo $row['secondnewstitle']; ?>"> </span> <br><br> <span style="float: left;"> Second news Date: </span> <span style="float: right;"> <input class="theform" size="40" name="secondnewsdate" value="<?php echo $row['secondnewsdate']; ?>"> </span> <br><br> <span style="float: left;"> Second News Message: </span> <span style="float: right;"> <textarea class="theform" name="secondnewsmessage" cols="40" rows="5"><?php echo $row['secondnewsmessage']; ?> </textarea> </span> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <hr> <span style="float: left;"> Third News Title: </span> <span style="float: right;"> <input class="theform" size="40" name="thirdnewstitle" value="<?php echo $row['thirdnewstitle']; ?>"> </span> <br><br> <span style="float: left;"> Third News Date: </span> <span style="float: right;"> <input class="theform" size="40" name="thirdnewsdate" value="<?php echo $row['thirdnewsdate']; ?>"> </span> <br><br> <span style="float: left;"> Third News Message: </span> <span style="float: right;"> <textarea class="theform" name="thirdnewsmessage" cols="40" rows="5"><?php echo $row['thirdnewsmessage']; ?> </textarea> </span> <br /> <br /> <br /> <br /> <br /> <br /> <br /> <hr> <center> <input type="submit" name="submit" id="submit" value="Save" /> </center> </form> Look and see for yourself. Quote Link to comment Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Share Posted November 7, 2009 <span style="float: right;"></span You dont have this for.. <textarea class="theform" name="mainnewsmessage" cols="40" rows="5"> <?php echo $row['mainnewsmessage']; ?> </textarea> Is this the problem? Quote Link to comment Share on other sites More sharing options...
Russia Posted November 7, 2009 Author Share Posted November 7, 2009 Nope, try and add it, see what happens to the whole form. Quote Link to comment Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Share Posted November 7, 2009 What is the CSS for the whole form? Quote Link to comment Share on other sites More sharing options...
Russia Posted November 7, 2009 Author Share Posted November 7, 2009 <style type="text/css"> input.the { border:solid 1px #675f39; padding:4px 2px; } textarea.theform { border:solid 1px #675f39; padding:4px 2px; margin-left:211px; </style> Quote Link to comment Share on other sites More sharing options...
Irresistable Posted November 7, 2009 Share Posted November 7, 2009 If thats for the whole form, then It can't be the CSS. It probably would be what I mentioned that you never included. Then provide a fix from there. It's registering the CSS, but its not registering the alignment. It causes some muddle with the form.. but I think it is the problem to the alignment of the right. Why dont you find another method to align, instead of left, and right. Use center for the whole thing? Or.. better yet. Use a table, which that way you can seperate the form fields in the different boxes, and resize them. It might be better for you. Quote Link to comment Share on other sites More sharing options...
Dorky Posted November 8, 2009 Share Posted November 8, 2009 input { float: right; clear: both; } textarea { float: right; clear: both; } Quote Link to comment Share on other sites More sharing options...
haku Posted November 8, 2009 Share Posted November 8, 2009 What dorky said. And take out all those <br /> tags, and use margins instead. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.