|
Posted by Kavok on 04/12/07 02:41
On Apr 11, 8:39 pm, Mike Scirocco <m...@yahoo.com> wrote:
> Kavok wrote:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://
> >www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> > <head>
> > <title>blah</title>
> > <style type="text/css">
> > body
> > {
> > color: #000;
> > font-size: 11px;
> > font: "Lucida Grande", "Trebuchet MS", Helvetica, Arial, sans-serif;
> > text-align: right;
> > }
> > </style>
> > </head>
> > <body>
> > <div id='divLogin' style='position:absolute; right: 0px; vertical-
> > align: top'>
> > <form id="login" action="/login.bml" method="post">
> > <div style="position:absolute; left: 0px; top 0px; height:
> > 20px;text-align: right;" >
> > <div style="position:absolute; left: -400px; top: 0px;
> > padding: 5px;text-align: right;">
> > <label for="strUser">Username:</label>
> > <br/>
> > <label for="strPassword">Password:</label>
> > </div>
> > </div>
> > </form>
> > </div>
> > </body>
> > </html>
>
> > I'm trying to get two labels to text-align:right inside of a div, its
> > not working. Sad
>
> > This works perfectly fine in IE6, but it appears to still be aligning
> > left in firefox.
>
> > If I change <div id='divLogin' style='position:absolute; right: 0px;
> > vertical-align: top'>" to <div id='divLogin' style='position:absolute;
> > left: 0px; vertical-align: top'>
>
> > And <div style="position:absolute; left: -400px; top: 0px; padding:
> > 5px;text-align: right;"> to
> > <div style="position:absolute; left: 200px; top: 0px; padding:
> > 5px;text-align: right;"> it works perfectly.
>
> > The document when run through the w3c validator is valid xhtml 1.0
> > strict (with the exception of no matching input fields for the
> > specific labels).
>
> > What am I doing wrong?
>
> Does this work for you?
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
> <title>blah</title>
> <style type="text/css">
> div{
> margin: 0;
> padding: 0;
> border: 0;}
>
> body{
> color: #000;
> font-size: 11px;
> font: "Lucida Grande", "Trebuchet MS", Helvetica, Arial, sans-serif;
> text-align: right;
> margin: 0;
> padding: 5px;}
>
> #divLogin{
> float: right;
> vertical-align: top;
> width: 166px;
> text-align: right;}
>
> form{
> margin: 0;
> padding: 2px 2px 0 0;
> text-align: right;
> font-size: 1em;}
>
> form input{
> width: 90px;
> padding: 0;
> margin: 0;
> height: 18px;}
>
> .clear{
> clear: both;}
>
> .lblLogin{
> width: 60px;}
>
> </style>
> </head>
> <body>
> <div id='divLogin'>
> <form id='login' action="/login.bml" method="post">
> <label class='lblLogin' for="strUser">Username:</label>
> <input type='text' value='' id='username' name='username'>
> <br/><label class='lblLogin' for="strPassword">Password:</label>
> <input type='text' value='' id='password' name='password'>
> <br/>
> </form>
> </div>
> <div class='clear'></div>
> </body>
> </html>
I've already got the rest of the code done. So this wasn't nessicary.
I just cut out a sample to make the problem easier to see.
If you view it in Firefox 1.5-2.X it puts a 'space' after the colon on
Password: and does not right-align it properly. I also don't see where
my missing colon (semicolon?) was.
Navigation:
[Reply to this message]
|