Create a group box around certain controls on a web form using CSS

前端 未结 3 967
栀梦
栀梦 2021-02-04 23:10

I have three controls on my web form of three drop down lists.

I want to create a graphical \"box\" around these controls. The reason for this is that selecting these co

3条回答
  •  独厮守ぢ
    2021-02-05 00:03

    There is the fieldset HTML element, which is made for this specific purpose: http://www.w3.org/wiki/HTML/Elements/fieldset. If you are set on using CSS only, you could do something like this:

    
    
    
    
        

    Step 1

    You could then style the h1 (or whatever type of HTML element you'd like to use for the header) and the div containing the input elements.

提交回复
热议问题