BookmarkSubscribeRSS Feed
Foxer
Fluorite | Level 6

I'm new to CSS styling in SAS so bear with me. I'm trying to get a double outside border and solid inside border using the following code, which is edited in Notepad++ and then called into a SAS ODS output using cssstyle= in an ODS RTF statement:

.table {    border: medium double black;    color: #000000;    font-family: 'Arial', 'Arial';    font-size: 10pt;    font-style: normal;    font-weight: normal;
 }
.proctitle{    color: #000000;    font-family: Arial, 'Albany AMT', Arial;    font-size: x-small;    font-style: normal;    font-weight: bold;
 }
.systemtitle{    font-family: Arial, 'Albany AMT', Arial;    font-size: large;    font-weight: 14pt;    color: black;
 }
.header, .rowheader, .footer, .rowfooter{    color: black;    font-size: 10pt;    font-family: Arial, 'Albany AMT', Arial;    background-color: #ffffff;    font-weight: bold;    text-align: center;    vertical-align: middle;    padding: 10px;
}
.data{    font-size: 10pt;    font-family: Arial, 'Albany AMT', Arial;    background-color: #ffffff;    text-align: center;    vertical-align: middle;    padding: 10px;    border: medium solid black;
 }

 However, this creates a the first table shown below. I'd like to get it to look like the second table shown below. Stack Exchange users suggested I come here as they have not found an answer. I appreciate any insight!


bad.pnggood.png
3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

I am sorry, you must be mistaken. CSS (Cascading Style Sheet) is something associated with Web Pages, its not really a SAS issue.  What are you attempting to do (i.e. what output format, what code are you using etc.)?  Is this something generated by the SAS system?  Maybe look here:

http://support.sas.com/rnd/base/ods/templateFAQ/Template_csstyle.html

Cynthia_sas
SAS Super FREQ
Hi:
Whether this works as you want depends on the destination of choice. For example, CSSSTYLE only works with RTF, PDF, HTML, but not other destinations like CSV (for example). And how border specifications are used by each destination, in particular could be different. You don't show all your code, just the CSS -- what is your destination of interest??? Can you post ALL your code and a sample of your DATA???

cynthia
Foxer
Fluorite | Level 6

What I have pasted above is the full code in a text editor, saved as a .css file (in this case, named TESTFOX.css). I'm using ODS RTF as shown below:

 

 

DATA TEST;
	INPUT CAR $10. YEAR;
	DATALINES;
	FORD	1995
	HONDA	1998
	CHEVY	2001
	;
RUN;

ODS RTF FILE="C:\USERS\DOCUMENTS\TEST.RTF" CSSSTYLE='C:\USERS\DOCUMENTS\TESTFOX.CSS';
PROC PRINT DATA=TEST NOOBS;
RUN;
ODS _ALL_ CLOSE;

 Attached is what the table looks like. There is the double outside border, but there is no inside solid border. 


Capture.PNG

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1431 views
  • 0 likes
  • 3 in conversation