# Right Align Text Box, Changing font in text box

Page 1 of 1

## 3 Replies - 16185 Views - Last Post: 21 July 2010 - 10:56 PM

### #1 gymangel812

Reputation: 3
• Posts: 116
• Joined: 15-February 10

# Right Align Text Box, Changing font in text box

Posted 21 July 2010 - 07:27 PM

I'm trying to right align a text box used for searching. I tried doing align="right" and it didn't work. Below is a screenshot of what it looks like now:

Also how would I change the font in the text box?

Here is the code:
```<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Ultimate Video Game Connection</title>
<link rel="stylesheet" media="all" type="text/css" href="styles.css" />
<style type="text/css">
<!--
body,td,th {
color: #080C58;
}
-->

<body>
<div id="outer">
<div id="nav_bar"><img src="header1.jpg" width="950" height="107" alt="logo" />
<div class="container">
<ul class="nav">
<li><a href="#url">Home</a></li>
</ul>
<ul class="nav">
<ul>

<li><a href="#url">Email</a></li>
<li><a href="#url">Telephone</a></li>
<li><a href="#url">Online Form</a></li>
</ul>
</li>
</ul>
<ul class="nav">
<ul>

<li><a href="#url">Email</a></li>
<li><a href="#url">Telephone</a></li>
<li><a href="#url">Online Form</a></li>
</ul>
</li>
</ul>
<ul class="nav">
<ul>

<li><a href="#url">Email</a></li>
<li><a href="#url">Telephone</a></li>
<li><a href="#url">Online Form</a></li>
</ul>
</li>
</ul>

<form method="post" action="./search.php">
<input type="text" name = "select_name" align="right" id="search" class="text" value="Search for a game!" onfocus="if (this.value == 'Search for a game!') this.value = '';" onblur="if (this.value == '') this.value = 'Search for a game!';" maxlength="255" />
<input type="image" class="button" src="btn_search.png" align="right" />
</form>

</div></div><br />
<div id="main_content">
<tr>
<td>left</td>
<td>center</td>
<td>right</td>
</tr>
</table>

</div>
</div>
</body>
</html>

```

This post has been edited by gymangel812: 21 July 2010 - 07:28 PM

Is This A Good Question/Topic? 0

## Replies To: Right Align Text Box, Changing font in text box

### #2 Nakor

• Professional Lurker

Reputation: 448
• Posts: 1,504
• Joined: 28-April 09

## Re: Right Align Text Box, Changing font in text box

Posted 21 July 2010 - 07:29 PM

try

```style="text-align: right"
```

or

```dir="rtl"
```

This post has been edited by Nakor: 21 July 2010 - 07:32 PM

### #3 gymangel812

Reputation: 3
• Posts: 116
• Joined: 15-February 10

## Re: Right Align Text Box, Changing font in text box

Posted 21 July 2010 - 07:51 PM

Nakor, on 21 July 2010 - 06:29 PM, said:

try

```style="text-align: right"
```

or

```dir="rtl"
```

I want to right align the text box itself, not the text inside of it. I want it to be directly to the left of the magnifying glass image.

I figured out how to change the font in the box, so I no longer need help doing that.

This post has been edited by gymangel812: 21 July 2010 - 07:52 PM

### #4 Dormilich

• 痛覚残留

Reputation: 3981
• Posts: 12,272
• Joined: 08-June 10

## Re: Right Align Text Box, Changing font in text box

Posted 21 July 2010 - 10:56 PM

float: right; comes to mind. (but that is still limited by the used container elements)

This post has been edited by Dormilich: 21 July 2010 - 10:57 PM