0

I know this question has been asked previously but I can't quite get mine to work.

So, I have a Calendar with some custom columns. I have two columns - a Yes/No and a Date column that I want side by side. So, I created a new NewForm.aspx and moved the Date columns with no issue (see image). Now what I want to do is resize the columns so that the Date column is closer to the Yes/No column.

I am happy to create some css within the form but don't really want to customise outside of this. I've also attached the code from SPD 2013 which hasn't been altered except for moving the columns.

Some clear instructions would be great!

Columns

    <tr>
                    <td width="190px" valign="top" class="ms-formlabel">
                        <H3 class="ms-standardheader">
                            <nobr>Channel eDM</nobr>
                        </H3>
                    </td>
                    <td width="400px" valign="top" class="ms-formbody">
                        <SharePoint:FormField runat="server" id="ff7{$Pos}" ControlMode="New" FieldName="Channel_x0020_eDM" __designer:bind="{ddwrt:DataBind('i',concat('ff7',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Channel_x0020_eDM')}"/>
                        <SharePoint:FieldDescription runat="server" id="ff7description{$Pos}" FieldName="Channel_x0020_eDM" ControlMode="New"/>
                    </td>
                    <td width="100px" valign="top" class="ms-formlabel">
                        <H3 class="ms-standardheader">
                            <nobr>Channel eDM Date</nobr>
                        </H3>
                    </td>
                    <td width="400px" valign="top" class="ms-formbody">
                        <SharePoint:FormField runat="server" id="ff8{$Pos}" ControlMode="New" FieldName="Channel_x0020_eDM_x0020_Date" __designer:bind="{ddwrt:DataBind('i',concat('ff8',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Channel_x0020_eDM_x0020_Date')}"/>
                        <SharePoint:FieldDescription runat="server" id="ff8description{$Pos}" FieldName="Channel_x0020_eDM_x0020_Date" ControlMode="New"/>
                    </td>
                </tr>
                <tr>
                    <td width="190px" valign="top" class="ms-formlabel">
                        <H3 class="ms-standardheader">
                            <nobr>Channel Event</nobr>
                        </H3>
                    </td>
                    <td width="400px" valign="top" class="ms-formbody">
                        <SharePoint:FormField runat="server" id="ff9{$Pos}" ControlMode="New" FieldName="Channel_x0020_Event" __designer:bind="{ddwrt:DataBind('i',concat('ff9',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Channel_x0020_Event')}"/>
                        <SharePoint:FieldDescription runat="server" id="ff9description{$Pos}" FieldName="Channel_x0020_Event" ControlMode="New"/>
                    </td>
                    <td width="190px" valign="top" class="ms-formlabel">
                        <H3 class="ms-standardheader">
                            <nobr>Channel Event Date</nobr>
                        </H3>
                    </td>
                    <td width="400px" valign="top" class="ms-formbody">
                        <SharePoint:FormField runat="server" id="ff10{$Pos}" ControlMode="New" FieldName="Channel_x0020_Event_x0020_Date" __designer:bind="{ddwrt:DataBind('i',concat('ff10',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Channel_x0020_Event_x0020_Date')}"/>
                        <SharePoint:FieldDescription runat="server" id="ff10description{$Pos}" FieldName="Channel_x0020_Event_x0020_Date" ControlMode="New"/>
                    </td>
1

Put a border=1 attribute on your TABLE tag and you will see the problem is the first column being (too) wide. Make that content less wide.

Otherwise it requires a DIV with negative margins to move your date fields to the left, getting you into even more problems if you don't have decent CSS skills.

  • So yes, I added that border and can see what you mean. If I make that column "less wide" I'm guessing that affects all the columns above and below it. No easy way to make the change just to that <td>? My CSS skills are fairly basic. – Kelsnz Feb 5 '17 at 23:37
  • No, it is a Table, the whole essence of TDs (for the past 20 years) is that each cell in the column is the same width. – Danny '365CSI' Engelman Feb 6 '17 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.