Jump to content

Textbox not aligning to the right.


Russia

Recommended Posts

I have tried everything tp align a textbox.

 

Here is what I am having trouble with.

 

 

This is a picture of what I need

current.bmp

 

---

 

<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>

Link to comment
https://forums.phpfreaks.com/topic/180676-textbox-not-aligning-to-the-right/
Share on other sites

<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)

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>

 

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.

 

 

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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.