List problem. Please, help me out.
-
Hello, I created a form which is built mostly with ordered lists: http://www.27lamps.com/public/Beta.htm I am having a few problems. All of them inside a DIV to which I am applying the class "ListBox" 1. ListBox is not being applied to the child tags of that DIV, i.e., OL and LI. They have the styles defined by parent class. How can I solve this? 2. My second problem is how to clear floats on my ol. I applied the overflow approach to my OL tag but this does not seem to work. Note that I am trying to display 3 LI per row simulating a table. Could someone, please, help me out? And I am open to any suggestion which might improve my CSS on this form. I have been working on this for quite a while but I know I can still improve it. Thank You, Miguel
-
Hello, I created a form which is built mostly with ordered lists: http://www.27lamps.com/public/Beta.htm I am having a few problems. All of them inside a DIV to which I am applying the class "ListBox" 1. ListBox is not being applied to the child tags of that DIV, i.e., OL and LI. They have the styles defined by parent class. How can I solve this? 2. My second problem is how to clear floats on my ol. I applied the overflow approach to my OL tag but this does not seem to work. Note that I am trying to display 3 LI per row simulating a table. Could someone, please, help me out? And I am open to any suggestion which might improve my CSS on this form. I have been working on this for quite a while but I know I can still improve it. Thank You, Miguel
shapper wrote:
1. You can define styles for the ol and li elements with .ListBox ol, and .ListBox ol li. Some styles are not inherited and you will need to explictly define them 2. Floats can be cleared with the 'clear: both' CSS attribute
-
shapper wrote:
1. You can define styles for the ol and li elements with .ListBox ol, and .ListBox ol li. Some styles are not inherited and you will need to explictly define them 2. Floats can be cleared with the 'clear: both' CSS attribute
Everything he said: also, li elements are block elements by default, so be sure to do something like this if you want them to appear on the same row: .ListBox ol li { display:inline; margin-right:1em; } Good Luck! Bart Edgerton www.ewebdev.net