Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
3.8k views
in SharePoint Server by 2 3 4
edited by

In SharePoint 2016, I have a new form "NewForm.aspx", I want to add a horizontal line between specific fields as a delimiter.

Add SharePoint horizontal line between fields

I need to add a horizontal line between payment and name fields!

I used SharePoint Designer to add this style with no avail!

<style type="text/css">
tr.bordered {
    border-bottom: 3px solid gray;
}
</style>

Any help?


1 Answer

0 like 0 dislike
by 151 169 345
selected by
 
Best answer

Add a horizontal line between specific field in SharePoint NewForm page

  1. Open your list.
  2. Click on "New Item".
  3. From the top right setting icon, select "Edit Page".


4. Click on "Add web part".
5. At "Media Content", Click on "Script Editor Web Part" > Add.


6. Add the below CSS style.

<style>
   .ms-formtable tr:nth-child(2) td {
       border-bottom:3px solid gray; }
</style>

Note: the number at nth-child(2) refers to the number of rows (fields) that the horizontal line will be added.
Ex: If you need to add it after the title, so you should add nth-child(1)

[Output]

by 2 3 4
0 0
yes !!!!! thanks a lot for your help
If you don’t ask, the answer is always NO!
...