side-by-side

Post here questions and problems related to editing and publishing DITA content.
Ecumaster
Posts: 11
Joined: Thu Jul 06, 2023 5:31 pm

side-by-side

Post by Ecumaster »

Screenshot_1.png
Hello,

I used side-by-side in css to place pictures next to the text with two following elements:

Code: Select all

*[outputclass ~= "side-by-side"] > *[class ~= "topic/p"] {
  display:inline-block;
  width: 40%;
  vertical-align:top;
}  
*[outputclass ~= "side-by-side"] > *[class ~= "topic/fig"] {
  display:inline-block;
  width: 50%;
  vertical-align:top;
  font-size:0pt;
} 
However, in places where the picture is next to the numbered paragraph, the number is slightly misplaced.
What could be the reason?

Cheers
Wojtek
You do not have the required permissions to view the files attached to this post.
Wojtek
julien_lacour
Posts: 665
Joined: Wed Oct 16, 2019 3:47 pm

Re: side-by-side

Post by julien_lacour »

Hi Wojtek,

You can align the marker and the content by setting the line-height property on the paragraph:

Code: Select all

*[outputclass ~= "side-by-side"] > *[class ~= "topic/p"] {
  display: inline-block;
  width: 40%;
  vertical-align: top;
  line-height: 1.25em;
}
*[outputclass ~= "side-by-side"] > *[class ~= "topic/fig"] {
  display: inline-block;
  width: 50%;
  vertical-align: top;
  font-size: 0pt;
}
Regards,
Julien
Ecumaster
Posts: 11
Joined: Thu Jul 06, 2023 5:31 pm

Re: side-by-side

Post by Ecumaster »

Works, thanks!
Wojtek
Post Reply