1

Hi im new to css and iv been trying to position a link under a text box "forgot password" link. In firefox on windows its out of line with the edge of the text box. Can anyone give me any pointers. Below is what i was trying to use:

.resetPassword {
    font-style: italic;
    font-size: 80%;
    position: absolute;
    style=top: 331px;
    style=left: 316px;
}

4 Answers 4

4

Try this:

.resetPassword {

    font-style: italic;
    font-size: 80%;
    position: absolute;
    top: 331px;
    left: 316px;

}

style=top and style=left aren't CSS properties.

Sign up to request clarification or add additional context in comments.

Comments

1

use this css:

input
{
float:left;
}
.resetPassword
{
float:left;
}

Comments

1

What is this:

style=top: 331px; style=left: 316px?

Try without style=..:

top: 331px; left: 316px

You should know that position absolute is relative to the next parent element thats positioned absolute or relative.

Try to give your parent element a position: relative and position your link to the bottom of the container.

Greeting, MRu

2 Comments

i used this css and in linux firefox works fine but not windows firefox font-style: italic; font-size: 80%; padding-left: 240px; position: relative; top: -5px;
I didnt mean you should use position relative to position your elements. Your link should stay absolute. But you could also try to give the parent container position: absolute; and the link your trying to move position:absolute; bottom: 0; right: auto; (or 0 or whatever you want)
0

Why are you using absolute position ? Assuming you have this two elements:

<input type="password" class="password"/>
<span class="password-forgot">Forgot your password</span>

You can use something like this:

<label>Password</label>
<input type="password"></input><br />
Forgot yout password?

or

<label>Password</label>
<input type="password" style="display:block"></input>
Forgot yout password?

If you really need a absolute position, remove the "style=" from you css, cause this is not a css property name, alias or anotherthing.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.