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

#1 gymangel812  Icon User is offline

  • D.I.C Head

Reputation: 3
  • View blog
  • 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:
Posted Image

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">
<head>
<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;
}
-->
</style></head>

<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">
		<li class="sub-li"><a class="sub-a" href="#url">Contact Us</a>
			<ul>

				<li><a href="#url">Email</a></li>
				<li><a href="#url">Telephone</a></li>
				<li><a href="#url">Online Form</a></li>
				<li><a href="#url">Snail Mail Address</a></li>
			</ul>
		</li>
	</ul>
    	<ul class="nav">
		<li class="sub-li"><a class="sub-a" href="#url">Contact Us</a>
			<ul>

				<li><a href="#url">Email</a></li>
				<li><a href="#url">Telephone</a></li>
				<li><a href="#url">Online Form</a></li>
				<li><a href="#url">Snail Mail Address</a></li>
			</ul>
		</li>
	</ul>
    	<ul class="nav">
		<li class="sub-li"><a class="sub-a" href="#url">Contact Us</a>
			<ul>

				<li><a href="#url">Email</a></li>
				<li><a href="#url">Telephone</a></li>
				<li><a href="#url">Online Form</a></li>
				<li><a href="#url">Snail Mail Address</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">
<table width="875" border="0" cellspacing="0" cellpadding="0">
  <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  Icon User is offline

  • Professional Lurker
  • member icon

Reputation: 441
  • View blog
  • Posts: 1,488
  • 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

Was This Post Helpful? 0
  • +
  • -

#3 gymangel812  Icon User is offline

  • D.I.C Head

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

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

Posted 21 July 2010 - 07:51 PM

View PostNakor, 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

Was This Post Helpful? 0
  • +
  • -

#4 Dormilich  Icon User is offline

  • 痛覚残留
  • member icon

Reputation: 3480
  • View blog
  • Posts: 10,025
  • 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

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1