BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
supp
Pyrite | Level 9

The style element .systitleandfootercontainer from style=HTMLBlue is:

 

.systitleandfootercontainer
{
  background-color: #FAFBFE;
  border: 0px solid #000000;
  border-spacing: 1px;
  color: #000000;
  font-family: Arial, 'Albany AMT', Helvetica, Helv;
  font-size: x-small;
  font-style: normal;
  font-weight: normal;
  width: 100%;
}

I want to add a bottom border. Using proc Template:



/***********/
/** stlye **/
/***********/
proc template;
	define style styles.Custom;
	parent = styles.htmlblue;
		style systitleandfootercontainer from systitleandfootercontainer /
			borderbottomwidth=1;
	end;
run;

I would expect to see this added to the systitleandfoottercontainer element

  • border-bottom-width: 1px;

 

However the element does not change in my output. How do I add a bottom border to by CSS style for the systileandfootercontainer element?

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
Diamond | Level 26

Hi:

  Take a look at this paper: https://support.sas.com/resources/papers/proceedings10/033-2010.pdf -- my tendency would be to use "from TitlesandFooters" because that's really the most immediate element that the System title inherits from. For this output below:

diff_lines_titles.png

 

The underline for Title 1 was done using textdecoration=underline in the style template. Title 2's underline was done the same way, but it inherited the underline from Title 1 in the template. Title 3 does not have any line and the color is the default color. Title 4 has the bottom border changed and the color is green.

 

  Here's the template code I used:

textdec_temp.png

 

  Here's the PROC PRINT code I ran -- used HTML because you didn't say what your ODS destination was.

td_code.png

 

Hope this gives you an idea of a couple of different ways to do what you want.

 

Cynthia

 

View solution in original post

4 REPLIES 4
ballardw
Super User

Can you provide example code used to test your style and show the expected output or what you expected to see change?

Please include data as well if needed. The example should be as simple as possible to make it simple to diagnose or understand where you expect changes.

 

 

 

Cynthia_sas
Diamond | Level 26

Hi:

  Take a look at this paper: https://support.sas.com/resources/papers/proceedings10/033-2010.pdf -- my tendency would be to use "from TitlesandFooters" because that's really the most immediate element that the System title inherits from. For this output below:

diff_lines_titles.png

 

The underline for Title 1 was done using textdecoration=underline in the style template. Title 2's underline was done the same way, but it inherited the underline from Title 1 in the template. Title 3 does not have any line and the color is the default color. Title 4 has the bottom border changed and the color is green.

 

  Here's the template code I used:

textdec_temp.png

 

  Here's the PROC PRINT code I ran -- used HTML because you didn't say what your ODS destination was.

td_code.png

 

Hope this gives you an idea of a couple of different ways to do what you want.

 

Cynthia

 

supp
Pyrite | Level 9

Thanks @Cynthia_sas .That paper was very helpful! I was using HTML as my ODS destination. It seems what we code in the Proc Template step get "interpreted" by SAS when creating the CSS output. At this time I don't have any more specific questions and probably just need to better understand the relationship between the proc template statements and what gets outputted into the the CSS file. 

 

As a side note it seems that if the output is to be emailed the msoffice2k destination does a better job of getting the output to render then the HTML output. At lest this was my experience with Outlook.

Cynthia_sas
Diamond | Level 26
Hi:
Outlook is a Microsoft product. The MSOFFICE2K destination creates "Microsoft-friendly" HTML tags. Microsoft and the W3C folks did not always agree over HTML styles and W3C style is not always respected by Office products. That's probably why you see that MSOFFICE2K works better with Office products. Office can "urp" over regular HTML that conforms to the W3C standard, but is happier with HTML that conforms to the Microsoft HTML standard.
Cynthia

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1673 views
  • 2 likes
  • 3 in conversation