0

I've put td width to 20% but it seems like the xsltlistviewwebpart does not fit to 20%. Basically it takes about 50% of the td cell. how can I make it fit or wordwrap on the cell. Here's a sample code

<td id="_invisibleIfEmpty" name="_invisibleIfEmpty" valign="top" width="20%"> 

                <WebPartPages:WebPartZone runat="server" Title="loc:FullPage" ID="FullPage" FrameType="TitleBarOnly"><ZoneTemplate>
                <WebPartPages:XsltListViewWebPart runat="server" ViewFlag="" ViewSelectorFetchAsync="False" InplaceSearchEnabled="False" ServerRender="False" ClientRender="True" InitialAsyncDataFetch="False" WebId="00000000-0000-0000-0000-000000000000" IsClientRender="False" GhostedXslLink="thread.xsl" NoDefaultStyle="" ViewGuid="{7BA153D6-334C-458C-9546-77ABC74E4A08}" EnableOriginalValue="False" ViewContentTypeId="" ListUrl="" ListDisplayName="" ListName="{422513C1-9F10-4A39-89A4-E369A5421DE7}" ListId="422513c1-9f10-4a39-89a4-e369a5421de7" PageSize="-1" UseSQLDataSourcePaging="True" DataSourceID="" ShowWithSampleData="False" AsyncRefresh="False" ManualRefresh="False" AutoRefresh="False" AutoRefreshInterval="60" Title="NewsFeed" FrameType="Default" SuppressWebPartChrome="False" Description="" IsIncluded="True" ZoneID="FullPage" PartOrder="2" FrameState="Normal" AllowRemove="True" AllowZoneChange="True" AllowMinimize="True" AllowConnect="True" AllowEdit="True" AllowHide="True" IsVisible="True" CatalogIconImageUrl="/_layouts/15/images/itdisc.png?rev=44" TitleUrl="/Lists/NewsFeed" DetailLink="/Lists/NewsFeed" HelpLink="" HelpMode="Modeless" Dir="Default" PartImageSmall="" MissingAssembly="Cannot import this Web Part." PartImageLarge="/_layouts/15/images/itdisc.png?rev=44" IsIncludedFilter="" ExportControlledProperties="False" ConnectionID="00000000-0000-0000-0000-000000000000" ID="g_7ba153d6_334c_458c_9546_77abc74e4a08" __MarkupType="vsattributemarkup" __WebPartId="{7BA153D6-334C-458C-9546-77ABC74E4A08}" __AllowXSLTEditing="true" __designer:CustomXsl="Fldtypes_mswhTitle.xsl;fldtypes_Ratings.xsl" WebPart="true" Height="" Width=""><ParameterBindings>

  • the xslt webpart is actually a newsfeed, I wanted to shrink it so it does not take up so much space. I try not to use "Appearance Width of the webpart" and set to a specific value because I am not sure how it will look like for pc/laptop with higher resolution... how can I make it such that it follows the size of the table td??? – Pradeep Kumar Jan 18 '17 at 1:33
0

Where is the closing tag of ? Have you tried to inspect the element and check if the width of that td is correctly 20%?

You could also try to set the width using css and mark the inline style as important, like:

<td style="width:20% !important;"><!-- Your XSLT List View Web Part --></td>
  • When I inspect element I can see the div tags. But when I look at the aspx page in SPD, the div tags are not there? Is there any reason for this? – Pradeep Kumar Jan 18 '17 at 8:00
  • Since xsltlistview web part is likely to generate its own html layout, it is possible that the div was generated by the xsltlistview web part itself. How about the 20% width? Did you succeed to achieve it using the above css styling? – AWJ Jan 18 '17 at 8:02
  • yup tried that but no go – Pradeep Kumar Jan 18 '17 at 8:28

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.