Community
InfraWorks Forum
Welcome to Autodesk’s InfraWorks Forums. Share your knowledge, ask questions, and explore popular InfraWorks topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Tooltip HTML not honoring CSS styles

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
taylor.carnell
451 Views, 2 Replies

Tooltip HTML not honoring CSS styles

taylor.carnell
Explorer
Explorer

I am an ex-web dev helping a designer to style tooltips for an InfraWorks model. We are trying to get text to wrap around to the next line, but the tooltip appears to be ignoring some CSS properties. The main problem is that while I can reduce the size of the tooltip, I cannot size my div or text elements which will not break/wrap until the width is reduced.

 

It appears correct in the visual view and when loading the HTML/CSS in a browser.

a09182af-2670-4030-95d6-1926f51ceab9.png

However when rendered in Infraworks, the width of elements (other than tooltip) appear to be ignored or overwritten. If it is the latter, the important flag does not stop this from happening. 

13787d46-69ee-4e07-a395-f06c1ffde157.png

 

Code is as follows:

<tooltip radius="20">
    <style>
	max-width:400px;
    </style>
</tooltip>
    
<div style="max-width:400px;">
    <h2> Heading 1 </h2>
    <br>
    <p style="color:red;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris</p>

    <br>
    <br>
    <h2> Heading 2 </h2>
    <br>
    <p style="color:red;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris</p>
</div>

 

I have tried setting the width of the paragraph elements inline and from the tooltip's style block as well, but to now avail. 

Please advise. 

 

Thanks! 

0 Likes

Tooltip HTML not honoring CSS styles

I am an ex-web dev helping a designer to style tooltips for an InfraWorks model. We are trying to get text to wrap around to the next line, but the tooltip appears to be ignoring some CSS properties. The main problem is that while I can reduce the size of the tooltip, I cannot size my div or text elements which will not break/wrap until the width is reduced.

 

It appears correct in the visual view and when loading the HTML/CSS in a browser.

a09182af-2670-4030-95d6-1926f51ceab9.png

However when rendered in Infraworks, the width of elements (other than tooltip) appear to be ignored or overwritten. If it is the latter, the important flag does not stop this from happening. 

13787d46-69ee-4e07-a395-f06c1ffde157.png

 

Code is as follows:

<tooltip radius="20">
    <style>
	max-width:400px;
    </style>
</tooltip>
    
<div style="max-width:400px;">
    <h2> Heading 1 </h2>
    <br>
    <p style="color:red;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris</p>

    <br>
    <br>
    <h2> Heading 2 </h2>
    <br>
    <p style="color:red;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris</p>
</div>

 

I have tried setting the width of the paragraph elements inline and from the tooltip's style block as well, but to now avail. 

Please advise. 

 

Thanks! 

2 REPLIES 2
Message 2 of 3

John_DeLeeuw
Advisor
Advisor
Accepted solution

@taylor.carnell you need to add the forcewebview attribute in the tooltip header like this: 

<tooltip radius="20" forcewebview="true">

Example:

JohnDeLeeuw_0-1643109600741.png

 

For simple tooltip content there is no web view used. The advantage is, that the size of the tooltip gets adjusted automatically. Nevertheless, sometimes not all html elements or styling are visualized correctly in this case. Then it might be necessary to force the use of the web view by setting this property to true.

John de Leeuw
Senior Consultant

Community Ambassador - Twitter - LinkedIn

@taylor.carnell you need to add the forcewebview attribute in the tooltip header like this: 

<tooltip radius="20" forcewebview="true">

Example:

JohnDeLeeuw_0-1643109600741.png

 

For simple tooltip content there is no web view used. The advantage is, that the size of the tooltip gets adjusted automatically. Nevertheless, sometimes not all html elements or styling are visualized correctly in this case. Then it might be necessary to force the use of the web view by setting this property to true.

John de Leeuw
Senior Consultant

Community Ambassador - Twitter - LinkedIn

Message 3 of 3

taylor.carnell
Explorer
Explorer
Awesome. Working Well. Cheers!

Awesome. Working Well. Cheers!

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Rail Community


 

Autodesk Design & Make Report