• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

DDX styling issue in header(alignment)

New Here ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

I want to add some header to TOC using DDX. I’m giving sample code format, and running code on CF10.

Sample Code

<StyleProfile name="headerForTOCPage1Style">

<Header>

<Center>

      <StyledText>

            <p text-align="right">1st row right aligned</p>

            <p text-align="right">2nd row right aligned</p>

            <p text-align="left">1st row left aligned</p>

            <p text-align="left">2nd row left aligned</p>

            <p text-align="left">3rd row left aligned</p>

            <p text-align="left">4th row left aligned</p>

            <p text-align="center" font-weight="bold">Table of Contents</p>

            <p margin-left="0.25in" margin-right="0in"><leader leader-pattern="solid" color="black"></leader></p>

            <p text-align="right" font-weight="bold">PAGE</p>

      </StyledText>

</Center>

</Header>

</StyleProfile>

 

It gives correct output while using CF10.

please refer attached CF10.PNG

 

When I’m writing same code with CF18, it is giving weird output. Please check following screenshot for output in CF18.

image.png

 

As per the CF18, it is not considering alignment in p tag which is inside the <Center> tag. So that I changed my code to accommodate expected output.

My modified code in CF18 is

 

<StyleProfile name="headerForTOCPage1Style">

<Header>

<Right>

      <StyledText>

            <p text-align="right">1st row right aligned</p>

            <p text-align="right">2nd row right aligned</p>

      </StyledText>

</Right>

<Left>

      <StyledText>

            <p text-align="left">1st row left aligned</p>

            <p text-align="left">2nd row left aligned</p>

            <p text-align="left">3rd row left aligned</p>

            <p text-align="left">4th row left aligned</p>

      </StyledText>

</Left>

<Center>

      <StyledText>

            <p text-align="center" font-weight="bold">Table of Contents</p>

            <p margin-left="0.25in" margin-right="0in"><leader leader-pattern="solid" color="black"></leader></p>

            <p margin-left="7in" text-align="right" font-weight="bold">PAGE</p>

      </StyledText>

</Center>

</Header>

</StyleProfile>

 

Now it is giving output as in image.

please refer attached CF18_2.PNG

 

In CF18 all tags i.e <Center>, <Left>, <Right> tags printing the text in parallel.

Please help me on this. I want the same output as 1st screenshot.

TOPICS
Getting started

Views

201

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

Hi

Which application are you using

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 13, 2020 Jan 13, 2020

Copy link to clipboard

Copied

LATEST

Coldfusion 2018

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation