By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,510 Members | 1,164 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,510 IT Pros & Developers. It's quick & easy.

Indet wrapped text

P: 1
I'm creating a tree-like structure of checkboxes and text (like the left side of windows explorer). When the text wraps around, i want the 2nd line to left align to the beginning of the text like
Expand|Select|Wrap|Line Numbers
  1. [] Foo
  2.    [] Bar
  3.       [] Foo bar
  4.          baz
  5.  
Not this
Expand|Select|Wrap|Line Numbers
  1. [] Foo
  2.    [] Bar
  3.       [] Foo bar
  4. baz
  5.  
My current solution is to put each line in a table like
[HTML]
<table><tr>
<td>
<!--- arbitrary amount of whitespace -->
<input type="checkbox>
</td>
<td>Some Text Some Text Some Text Some Text </td>
</tr></table>
[/HTML]
Is there a better css related way to do this?

thanks,
stewie
Apr 3 '08 #1
Share this Question
Share on Google+
1 Reply


eWish
Expert 100+
P: 971
CSS list-style Property

Expand|Select|Wrap|Line Numbers
  1. <ul>
  2.    <li><input type="checkbox" name="a" value="a"> A</li>
  3.      <ul>
  4.         <li><input type="checkbox" name="a1" value="a1"> A1</li>
  5.      <ul>
  6.          <li><input type="checkbox" name="a2" value="a2"> A2</li>
  7.     </ul>
  8.     </ul>
  9. </ul>
However, the alignment will not be exactly as you are wanting. Not sure if the alignment can be changed as you are illustrating you want it.

--Kevin
Apr 3 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.