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

Hello everyone - I'm trying to print a large number of tables (as html.files) with severela groups of column headers. I've got to a point where I solved all problems for IE. What remains is that my group bottomborder( spans 4 columns) column header don't span all for columns in Firefox or Chrome. It only spans the text itself. IE looks fine, it spans all for columns.

I use ods escapechar with this styledefinition to print the border:     

("~{style [width=100pct textalign=center htmlstyle='border-bottom:1px solid black';] &Labgrupp1}"

Anyone have any idea where to start?

Kind regards,

Luonasbor

1 ACCEPTED SOLUTION

Accepted Solutions
Luonas
Calcite | Level 5

Tech support gave me a thorough answer, it is impossible in 9.3 to make it look equally good in both ie, firefox and chrome. 9.4 will have an option that makes it possible to do that but in 9.3 it isn't possible without manually editing the html-code.

http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug

A satisfying answer nonetheless (and cool to get a reference to 9.4 Smiley Happy)

View solution in original post

3 REPLIES 3
Cynthia_sas
SAS Super FREQ


Hi:

  Sometimes in HTML and browsers, there can be differences in some HTML rendering. I am having a hard time visualizing where you are using your style override -- in a LINE statement? Is it in a COMPUTE AFTER or part of a column header's label or ... ?

  If you are applying the border bottom to a text string, where is the open paren coming from and where is the closing paren? Is that part of your syntax? Also, what STYLE= option do you use on the ODS HTML invocation? STYLE=EGDEFAULT, STYLE=SASWEB??? What version of SAS are you running 9.2 or 9.3????

  However,  my guess is that if you investigated, you might find that Firefox is conforming to the HTML (W3C) specification for how style should be applied and that Microsoft (IE) has a different interpretation of how that HTML tag should be rendered.  After all, when Microsoft didn't agree with the W3C on style, they created their own "flavor" of HTML and their own "flavor" of CSS.  Anyway, I believe that when you use a STYLE override in a LINE statement, you get a <TR> and inside the table row tags, you get a <SPAN> tag. The <SPAN> tag explicitly says (http://www.w3schools.com/tags/tag_span.asp) "The <span> tag provides a way to add a hook to a part of a text or a part of a document." So it sounds to me from your description that Firefox applies the border bottom to the text itself and not to the entire space in the cell that contains the text.

  You are probably too young to remember the "IE vs Netscape" days of the Internet, when you would get a message on a web page that said "This page best viewed in Internet Explorer" or "This page best viewed in Netscape Navigator". Personally, I'd chalk this up to Microsoft IE being different. But if you need to verify whether there is a workaround for Netscape to mimic the IE behavior, then my guess is that Tech Support are the ones to help you out with that question.

cynthia

Luonas
Calcite | Level 5

Hi and thanks for the answer. It's in the column part of the report:

<ods and proc report invocation>

Column    Linegroup

        (  Area

        Boldline

        ("~{style [width=100pct textalign=center htmlstyle='border-bottom:1px solid black';] &Labgroup1}"

                                                        ( "&Label1" &K1) ( "&Label2" &K2)

                                                        ( "&Label3" &K3) ("&Label4" &K4) )

        Blank1

        ("~{Style [width=100pct textalign=center htmlstyle='border-bottom:1px solid black;'] &Labgroup2}" 

                                                        ( "&Label5" &K5) ( "&Label6" &K6)

                                                        ( "&Label7" &K7) ("&Label8" &K8)  )

       

        ("&Label9" '' &K9) ("&Label10" '' &K10) 

        Switch Switch2 )  ;

The style invocation is sasweb and I'm running this on 9.3 (from EG at the moment).

Yeah, I've sen that span tag, it looks like it says: <span class="c">

I faintly remember seeing it when I first started using browsers, but even for me it's quite a long time ago. Smiley Happy

Thanks, I'll try to see if it's possible, it does look a lot better with that part displayed as I want it to.

Luonas

Luonas
Calcite | Level 5

Tech support gave me a thorough answer, it is impossible in 9.3 to make it look equally good in both ie, firefox and chrome. 9.4 will have an option that makes it possible to do that but in 9.3 it isn't possible without manually editing the html-code.

http://en.wikipedia.org/wiki/Internet_Explorer_box_model_bug

A satisfying answer nonetheless (and cool to get a reference to 9.4 Smiley Happy)

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
  • 843 views
  • 3 likes
  • 2 in conversation