sbornstein2
asked on
CSS Question - Align Listbox with Label
Hello all,
I have a simple CSS question. I have a panel and within that panel I want to align in a div tag etc. I want two listboxes side by side and then above each listbox a label. The listboxes are 200px wide each. I don't want to use tables anymore and widths etc. I want to use all CSS. Can someone show me an example on how to line these up? I don't want to use top because I am making certain panels visible and not visible etc. so not sure that would work.
I have a simple CSS question. I have a panel and within that panel I want to align in a div tag etc. I want two listboxes side by side and then above each listbox a label. The listboxes are 200px wide each. I don't want to use tables anymore and widths etc. I want to use all CSS. Can someone show me an example on how to line these up? I don't want to use top because I am making certain panels visible and not visible etc. so not sure that would work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This looks good but the listboxes are centered in the browser. How do I just have them left aligned
If you don't want auto margins, remove "margin: 0 auto" from #wrapper and the entire wrapper will be left aligned.
You can do whatever you want with the outer wrapper. In my example, the wrapper is centered on the page, but the two divs containing the listboxes are left aligned inside that wrapper.
You can do whatever you want with the outer wrapper. In my example, the wrapper is centered on the page, but the two divs containing the listboxes are left aligned inside that wrapper.
ASKER
thanks
Open in new window