bigsilk Posted October 20, 2009 Report Share Posted October 20, 2009 I've several <textarea> on a page, and they are aligned to the bottom-left of the text area. I want them aligned to the top-left. Link to comment Share on other sites More sharing options...
sempervirent Posted October 20, 2009 Report Share Posted October 20, 2009 I've several <textarea> on a page, and they are aligned to the bottom-left of the text area. I want them aligned to the top-left.You'll need to give a link (preferred method), or post more code (less preferred method), before anyone will understand what you're asking. Link to comment Share on other sites More sharing options...
bigsilk Posted October 20, 2009 Author Report Share Posted October 20, 2009 (edited) First, go to:Visit This PageEnter 'user1' for the User name. Don't worry about the password. Hit the Search button.On the next page, notice how the labels for the <textarea> are located at the bottom-left of the boxes. I want them to be top-left. Edited October 20, 2009 by bigsilk Link to comment Share on other sites More sharing options...
sempervirent Posted October 20, 2009 Report Share Posted October 20, 2009 (edited) Notice how the labels for the <textarea> are located at the bottom-left of the boxes. I want them to be top-left.I don't see any labels there, just some text inside of a DIV. As such, you can't do very much with CSS. What you need to do is actually wrap a <label> tag around each text and input pair. Then you can position things with CSS.It's always a good idea to surround text with some kind of tag to give it semantic meaning, and it also helps you position/style/manipulate that text with CSS. Without an enclosing tag it's hard to "reach" with CSS. The <div> tag is generic, it doesn't have any semantic meaning (which is why it's used to enclose other elements). You have to think of HTML like authoring any other kind of document, it's not just jumping through a bunch of hoops to get things to "look" right. If your document makes semantic sense it's usually much easier to work on the aesthetic side of things. Edited October 20, 2009 by sempervirent Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now