Talk:ACF css: Difference between revisions

From Alpine Linux
No edit summary
(use https)
 
(2 intermediate revisions by 2 users not shown)
Line 13: Line 13:
I'm wondering if we could use something else, either divs (with classes)  
I'm wondering if we could use something else, either divs (with classes)  


  <div class=label>foo</div><div class=item><input type......></div>
&lt;div class=label>foo&lt;/div>&lt;div class=item>&lt;input type......>&lt;/div>


http://www.alistapart.com/stories/practicalcss/
https://www.alistapart.com/stories/practicalcss/


has some examples of doing this with forms, to make the elements line up correctly.   
has some examples of doing this with forms, to make the elements line up correctly.   


What do you think?
What do you think?
---
Your right, that I'm trying to do 2 columns as you describe.<BR>
There might be a better way... but still you get a good, clean layout when not using a css if you use dl,dt and dd.
The fact that dl only can contain dt and dd shouldn't be a problem. As I understand the dd can contain whatever (like a div, p or something else).<BR>
The use of dl,dt and dd is only when you want the columns layout with description at left, and the result/values at right.<BR>
When using a input, select, textarea or something else inside the dd, you can use the dd's width and say that the input,select,... could be 100% wide. This would result in a input,select,... which is as wide as the dd.
But if we don't need the description field at left (as dt) then you just use whatever you need inside the #content (like a input,select,textarea,whatever). This could then use 100% of the #content width.<BR>
I have done some experiments with this in the acf-openntpd.
[[User:mhavela|mhavela]] Sun Jan 13 22:03:54 CET 2008<BR>
---

Latest revision as of 20:39, 25 August 2023

Regarding DL, DD, DT:

My understanding is you are trying to do this:

 dt    |   dd   
foo    |  [                    ]
bar    |  [                    ]

where the dt is on the "left" column, and the dd is on the "right" column. Unfortunately, A DL can only contain DD and DT tags, not other divs or elements. that might be limiting, where we would want something like ajax or even just a complex formset or other item on the "right hand" of the block


I'm wondering if we could use something else, either divs (with classes)

<div class=label>foo</div><div class=item><input type......></div>

https://www.alistapart.com/stories/practicalcss/

has some examples of doing this with forms, to make the elements line up correctly.

What do you think?

---

Your right, that I'm trying to do 2 columns as you describe.
There might be a better way... but still you get a good, clean layout when not using a css if you use dl,dt and dd.

The fact that dl only can contain dt and dd shouldn't be a problem. As I understand the dd can contain whatever (like a div, p or something else).
The use of dl,dt and dd is only when you want the columns layout with description at left, and the result/values at right.
When using a input, select, textarea or something else inside the dd, you can use the dd's width and say that the input,select,... could be 100% wide. This would result in a input,select,... which is as wide as the dd.

But if we don't need the description field at left (as dt) then you just use whatever you need inside the #content (like a input,select,textarea,whatever). This could then use 100% of the #content width.
I have done some experiments with this in the acf-openntpd.


mhavela Sun Jan 13 22:03:54 CET 2008
---