bigsilk Posted October 20, 2009 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 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 Share Posted October 20, 2009 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. Link to comment Share on other sites More sharing options...
sempervirent Posted October 20, 2009 Share Posted October 20, 2009 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.