Hi All,
I want to use following div class in SAS in put statement for modifying div size & word wrap option. How can i following code in SAS.
<!DOCTYPE html>
<html>
<head>
<style>
div {
width: 150px;
border: 1px solid #000000;
}
div.a {
word-wrap: normal;
}
div.b {
word-wrap: break-word;
}
</style>
</head>
<body>
<h1>The word-wrap Property</h1>
<h2>word-wrap: normal (default):</h2>
<div class="a"> This div contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.</div>
<h2>word-wrap: break-word:</h2>
<div class="b"> This div contains a very long word: thisisaveryveryveryveryveryverylongword. The long word will break and wrap to the next line.</div>
</body>
</html>
HTML code is plain text, so you just need a series of put statements. What is your problem?
I am using put statement, the root problem is one line is too long so i want to apply word wrap with following line:
Put 'Welcome to SAS® Suppor, This is sample line for understanding problem statement';
The following solution i got in html, how can i convert it into put statement ?
<style>
div {
width: 150px;
border: 1px solid #000000;
}
div.a {
word-wrap: normal;
}
div.b {
word-wrap: break-word;
}
</style>
Regards,
Ashish
So you have a HTML issue, not a SAS-related one.
But I tested your initial code (Chrome), and the long word in the second box was correctly wrapped.
@Kurt_Bremser Yes the second html code is working as expected.
I am looking for converting this code into put statement for using in SAS.
Can you suggest how can i convert below code in SAS, since only div option i am able to convert but struggling for below code conversion in SAS in put statement.
div {
width: 150px;
border: 1px solid #000000;
}
div.b {
word-wrap: break-word;
}
It's just a series of put statements, nothing fancy. If you have problems with that, show your code and log.
Use the "little running man" for code and {i} for logs.
Not sure what your wrapping problem is , but HTML in general ignores whitespace, so line breaks inserted because of long lines is normally not a problem. And if you need long lines of text just make sure to set the LRECL long enough when writing the file. Again HTML in general does not care if your code has any line breaks at all. You can write your HTML on one line if you want.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.