Border Lines and div tags

This forum is for all Flare issues related to styles, stylesheets and XML.
Post Reply
tlewis
Propeller Head
Posts: 13
Joined: Tue Sep 16, 2014 12:53 pm

Border Lines and div tags

Post by tlewis »

As a part of a new style at my work, we received a request to add a update our note style to include a blue line along the left side of our notes, something like this:
img1.png
Since our note sections often can include lists or different paragraph styles, I figured that the fastest and easiest way to do this would be with a div style. I made 3 div styles, one for each level of indentation for our notes, and then applied them to my test doc.

In the print format, things looked great.
img2.png
In the non-print output, things did not work.
img3.png
I'm not an expert with .CSS, so I know that the error probably lies with how I created the styles. Here's the div styles I created:

Code: Select all

div.NOTE
{
	border-left: solid 2px #0000ff;
	margin-left: 0.15in;
	padding-left: -0.15in;
}

div.NOTE2
{
	border-left: solid 2px #0000ff;
	margin-left: 0.525in;
	padding-left: -0.525in;
}

div.NOTE3
{
	border-left: solid 2px #0000ff;
	margin-left: 0.90in;
	padding-left: -0.9in;
Any suggestions on how to fix this issue?
You do not have the required permissions to view the files attached to this post.
Daniel Ferguson
Propeller Head
Posts: 77
Joined: Wed Jul 10, 2013 12:34 pm
Location: Salt Lake City
Contact:

Re: Border Lines and div tags

Post by Daniel Ferguson »

Can you post the HTML code for the samples that you've shown?
Daniel Ferguson
Certified Flare Trainer & Consultant
smartoutput.com
tlewis
Propeller Head
Posts: 13
Joined: Tue Sep 16, 2014 12:53 pm

Re: Border Lines and div tags

Post by tlewis »

Here's the HTML of the webhelp output:

Code: Select all

    <head>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta charset="utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <link href="../Skins/Default/Stylesheets/Slideshow.css" rel="stylesheet" type="text/css" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/TextEffects.css" rel="stylesheet" type="text/css" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Topic.css" rel="stylesheet" type="text/css" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Components/Styles.css" rel="stylesheet" type="text/css" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Components/Tablet.css" rel="stylesheet" type="text/css" data-mc-generated="True" />
        <link href="../Skins/Default/Stylesheets/Components/Mobile.css" rel="stylesheet" type="text/css" data-mc-generated="True" /><title>Configuring Salesforce call centers</title>
        <link href="Resources/Stylesheets/Global stylesheet.css" rel="stylesheet" type="text/css" />
        <script src="../Resources/Scripts/custom.modernizr.js" type="text/javascript">
        </script>
        <script src="../Resources/Scripts/jquery.min.js" type="text/javascript">
        </script>
        <script src="../Resources/Scripts/require.min.js" type="text/javascript">
        </script>
        <script src="../Resources/Scripts/require.config.js" type="text/javascript">
        </script>
        <script src="../Resources/Scripts/foundation.min.js" type="text/javascript">
        </script>
        <script src="../Resources/Scripts/plugins.min.js" type="text/javascript">
        </script>
        <script src="../Resources/Scripts/MadCapAll.js" type="text/javascript">
        </script>
    </head>
    <body>
        <div class="NOTE">
            <p class="Body">NOTE: Test test test</p>
            <p class="Bulleted" value="2">test test </p>
            <p class="Bulleted" value="3">test test</p>
            <p class="Bulleted" value="4">test tes</p>
        </div>
        <p>Procedures</p>
        <p class="Command1" data-mc-autonum="1.  "><span class="autonumber"><span class="bold">1.  </span></span>Test</p>
        <div class="NOTE2">
            <p class="comment_in_steps">NOTE: Test t est test</p>
            <p class="Bulleted2" value="2">test test</p>
            <p class="Bulleted2" value="3">test test</p>
            <p class="Bulleted2" value="4">test test</p>
        </div>
        <p class="Command2" data-mc-autonum="2.  "><span class="autonumber"><span class="bold">2.  </span></span>test</p>
        <p class="comment_in_steps">Test test Test:</p>
        <p class="Bulleted2" value="7">Test Test</p>
        <div class="NOTE3">
            <p class="comment_in_steps2">NOTE</p>
            <p class="Bulleted3" value="2">Test Test Test</p>
            <p class="Bulleted3" value="3">test test</p>
            <p class="Bulleted3" value="4">test</p>
        </div>
    </body>
</html>
Daniel Ferguson
Propeller Head
Posts: 77
Joined: Wed Jul 10, 2013 12:34 pm
Location: Salt Lake City
Contact:

Re: Border Lines and div tags

Post by Daniel Ferguson »

My guess is that your paragraph styles that are applied to your list paragraphs are adding extra padding or margin. We'd have to see your list paragraph styles to know for sure.

Have you considered using actual <ol>, <ul>, and <li> tags instead of paragraph classes for your lists? See this discussion. viewtopic.php?f=6&t=27762
Daniel Ferguson
Certified Flare Trainer & Consultant
smartoutput.com
tlewis
Propeller Head
Posts: 13
Joined: Tue Sep 16, 2014 12:53 pm

Re: Border Lines and div tags

Post by tlewis »

Yeah, it definitely looks like it is adding both margin settings in the p and div together in the web version.

We have thought about switching to a list style. We inherited a lot of styles from Framemaker and have never had the bandwidth to really clean up how the styles are used. It's definitely on my list of things I'd like to get done :? .

Here's the styles that were used inside the note div style.

Code: Select all

p.Body
{
	text-align: left;
	margin-left: 0.25in;
	margin-right: 0in;
	margin-bottom: 6pt;
	font-family: Arial;
	font-weight: normal;
	font-style: normal;
	font-size: 10pt;
	letter-spacing: 0em;
	text-indent: 0px;
	line-height: 12pt;
	text-decoration: none;
	mc-hyphenate: never;
	color: #000000;
}

p.Bulleted
{
	font-family: Arial;
	font-size: 10pt;
	color: #000000;
	line-height: 12pt;
	mc-auto-number-offset: 0em;
	margin-bottom: 0pt;
	display: list-item;
	list-style-type: disc;
	margin-left: 0.64in;
	margin-top: 4pt;
	list-style-position: outside;
}

p.Bulleted2
{
	font-family: Arial;
	font-size: 10pt;
	color: #000000;
	line-height: 12pt;
	mc-auto-number-offset: 0px;
	mc-auto-number-position: inside-head;
	display: list-item;
	list-style-type: disc;
	margin-bottom: 0pt;
	margin-left: 1.03in;
	margin-top: 4pt;
}

p.Bulleted3
{
	font-family: Arial;
	font-size: 10pt;
	color: #000000;
	line-height: 12pt;
	mc-auto-number-offset: 0px;
	mc-auto-number-position: inside-head;
	display: list-item;
	list-style-type: disc;
	margin-bottom: 0pt;
	margin-left: 1.42in;
	margin-top: 4pt;
}

p.Command2
{
	text-align: left;
	margin-right: 0cm;
	margin-bottom: 0pt;
	font-family: Arial;
	font-weight: normal;
	font-style: normal;
	font-size: 10pt;
	letter-spacing: 0em;
	color: #000000;
	mc-hyphenate: never;
	mc-auto-number-position: inside-head;
	line-height: 12pt;
	text-decoration: none;
	mc-auto-number-class: bold;
	mc-auto-number-format: '{n+}.  ';
	margin-left: 0.64in;
	margin-top: 4pt;
	text-indent: -19px;
}

p.comment_in_steps
{
	text-align: left;
	margin-left: 0.64in;
	margin-right: 0in;
	font-family: Arial;
	font-weight: normal;
	font-style: normal;
	font-size: 10pt;
	letter-spacing: 0em;
	color: #000000;
	mc-hyphenate: never;
	text-indent: 0px;
	line-height: 12pt;
	text-decoration: none;
	margin-top: 0pt;
	margin-bottom: 4pt;
	list-style-type: disc;
}
Post Reply