CSS Issues , HTML text not rendering properly

I've loaded and parsed some xhtml in my DataManager class that is validated against the W3C strict dtd.I'm pushing certian bits of this into public arrays in my DataManager. My ContentManager, calls to the DataManager, and is returned a corresponding data set ,  instantiates a new GenericSection , and passes in the array as an argument in the constructor.
var targetData : Array = new Array();
targetData = DataManager.getInstance().returnAboutData();
var targ : String = targetData[0].toString();
var targFormat : String = targ.slice( ( targ.indexOf( '">' , 0 ) + 2 ) , ( targ.lastIndexOf( '/p>' , 0 ) - 3 ) );
var newSection : GenericContent = new GenericContent( targFormat );                   
newSection.publicId = ind;
contentContainer.addChild( newSection );
The output of formatTarg is :
The purpose of this site is to serve as an online portfolio and work reference. I am a 28 year old WEB/INTERACTIVE developer who has worked in the Los Angeles and Greater Orlando areas since 2004. I specialize in
  <span class="bulletText">ADOBE FLASH</span>
  <span class="bulletText">FLASH ANIMATION</span>
  <span class="bulletText">ACTIONSCRIPT 2.0/3.0</span>
  , and
  <span class="bulletText">ACTIONSCRIPT PROJECTS IN FLEX</span>
  . The client links listed above will provide several examples of media that I developed for the web. Please select the ACTIVE TEXT to the right of the PROJECT LINK heading in each section , if available ,  to view the site.
My GenericContent class i linked to a movieclip in the library , with one dynamic textfield, with the following settings :
instanceName : sectionText;
anti-aliasing : for readability;
embed : uppercase , lowercase , numerals , and puncutation
behavior : muliline
render as html : selected( true );
sectionText is declared as a public var in the GenericContent instance.
I have tried applying styles as such :
private var css                    :            StyleSheet;
private var cssDeclarations            :            String;
css = new StyleSheet();
var bulletText : Object = new Object(); 
bulletText .fontSize = 20; 
bulletText .fontWeight = "bold"; 
bulletText .color = "#336699"; 
bulletText .leading = 12;
css.setStyle( ".bulletText ", bulletText  );
sectionText.wordWrap = true;
sectionText.embedFonts = true;
sectionText.styleSheet = css;
sectionText.htmlText = contentText;
and
css = new StyleSheet();
cssDeclarations = ".bulletText{font-size:12px;color:#FFFF00"};
css.parseCSS(cssDeclarations);
sectionText.wordWrap = true;
sectionText.embedFonts = true;
sectionText.styleSheet = css;
sectionText.htmlText = contentText;
The html is not being rendered properly , the tags themselves do not show up , but no style is being applied. Any ideas , or perhaps a better approach ? thanks !

Upon further investigation i figured out what was wrong.
This property :
bulletText .fontWeight = "bold";
was causing my text to not render because bold character weren't used within the symbol associated with the class. By removing that and cleaning up the code a bit ,
var span : Object = new Object(); 
span.fontSize = 12; 
span.color = "#336699";
css = new StyleSheet();
css.setStyle( ".bulletText", span );
sectionText.styleSheet = css;           
sectionText.htmlText = contentText;
it rendered semi correctly , except with erronious line breaks , the solution for that was to , remove any instances of "/n" from the contentText string before setting the sectionText , done like this :
var pattern : RegExp = /\n/g;
contentText = contentText.replace( pattern , "" );
now it looks great !

Similar Messages

  • HTML emails not rendering properly - letters bunched up

    Weirdest thing happening in the last few days.... Most of the HTML emails I receive have not been rendering properly within Mail - the letters appear all bunched up in strange little groups... This only started about a week and a half ago....
    Anyone else seen this phenomenon? If so, is there an easy way to fix it, as it is quite annoying?

    Upon further investigation i figured out what was wrong.
    This property :
    bulletText .fontWeight = "bold";
    was causing my text to not render because bold character weren't used within the symbol associated with the class. By removing that and cleaning up the code a bit ,
    var span : Object = new Object(); 
    span.fontSize = 12; 
    span.color = "#336699";
    css = new StyleSheet();
    css.setStyle( ".bulletText", span );
    sectionText.styleSheet = css;           
    sectionText.htmlText = contentText;
    it rendered semi correctly , except with erronious line breaks , the solution for that was to , remove any instances of "/n" from the contentText string before setting the sectionText , done like this :
    var pattern : RegExp = /\n/g;
    contentText = contentText.replace( pattern , "" );
    now it looks great !

  • HTML text not showing properly in CR 11

    I am trying to display the html text in the crystal report but the first screen shot displays something ugly text interpretation:
    But when i change the text interpretation to HTML then instead of showing nice html tags like ul, li AND table tags it is not recognizing the html tags at all
    is there any way to display the html nicely???????

    Not all HTML tags are supported by CR.
    Per KB 1657131, the supported HTML tags in CR2008 and later are:
    html
    body
    div (causes a paragraph break)
    tr (causes only a paragraph break; does not preserve column structure of a table)
    span
    font
    p (causes a paragraph break) 
    br (causes a paragraph break)
    h1 (causes a paragraph break, makes the font bold & twice default size)
    h2 (causes a paragraph break, makes the font bold & 1.5 times default size)
    h3 (causes a paragraph break, makes the font bold & 9/8 default size)
    h4 (causes a paragraph break, makes the font bold)
    h5 (causes a paragraph break, makes the font bold & 5/6 default size)
    h6 (causes a paragraph break, makes the font bold & 5/8 default size)
    center
    big (increases font size by 2 points)
    small (decreases font size by 2 points if it's 8 points or larger)
    b
    i
    s
    strike
    u
    strong
    ol (ordered list)
    ul (unordered list)
    li (list item)
    -Abhilash

  • JSF component inside HTML table -- not rendering properly

    I have a HTML table like the one below. In one of those columns (td) I have a JSF component. When I run the app, the JSF component (even if its a simple inputText or panelGrid or panelGroup) is not getting inside the td. Instead, it forms a seperate table after this td.
    Code I have:
    <table border="0" cellpadding="0" cellspacing="0">
    <tbody>
    <tr>
    <td>... ..MULTIPLE Td's here - Deleted for simplicity </td>
    <td class="topNav">
    Blog Directory
    </td>
    <td>
    <img src="./images/top_button_right.gif"/>
    </td>
    <td class="topNav">
    <f:panelGroup>
    <h:inputText value="Username"/>
    <h:inputSecret value="Password"/>
    </f:panelGroup>
    </td>
    </tr>
    </tbody>
    </table>
    What I expected:
    username, passwd field inside the top level HTML table.
    What comes: (as a result of running thsi JSF page )
    <table> -- Original table
    <td> </td> -- -TD that had the inputText - comes empty here
    </table>
    <table>
    <tbody>
    <tr>
    <td><input type="text" name="_id1:header:EasyHeader:_id4" value="Username" /><input type="password" name="_id1:header:EasyHeader:_id5" value="" /></td>
    </tr>
    <tr>
    <td><table>
    I am a newbie to JSF & due to the complexity of the layout & page, I m unable to get rid of the HTML tags totally.
    Thanks in advance.
    Ganesh

    Found the solution to the problem.
    wrapped the entire HTML page till the JSF component ( panelGrid) under <f:verbatim>.
    something like this
    <f:verbatim>
    <table>
    <tr> <td>...</td>
    <td>
    </f:verbatim>
    <h:panelGrid> ... </h:panelGrid>
    <f:verbatim>
    </td>
    </table>
    </f:verbatim>

  • Rotated text not rendering properly

    I'm using SSRS 2008 R2 integrated with SharePoint 2010. In Report Builder 3, i have set the text to Rotate270 and it looks fine. When i save file to sharepoint and view it in the browser, the text is no longer properly positioned in the cell, see below.
    Is this a bug? does anyone have any suggestions on how to fix this?
    Image from Report Builder 3 preview mode (Business Development is rotated 270 and looks fine)
    image from Browser - Business development is truncated
    Dean MCTS-SQL 2005 Business Intelligence, SharePoint 2010, Configuration

    Hello Dean,
    This is not supported in Report viewer when you see the same report from application/explorer view..
    for this 270 Degree rotation, you will have to write VB code and from that you can easily convert your text to 270 Degree rotation.
    from my point of view and RnD, there is only way to convert 270 Degree rotation in reports.
    use the following and you will get your answer.
    for that,
    first Use System.Drawing DLL in your report.
    take image object.
    MIME Type : JPEG and field : =Code.LoadImage("Your Text", "Total No Of Character")
    example : =Code.LoadImage("20CF", "4")   OR 
    example : =Code.LoadImage("20CF", Length("20CF")
    and write this following code
    Function LoadImage(ByVal sImageText as String,ByVal sImageTextMax as String)
    sImageTextMax= sImageTextMax.PadRight(40)
    Dim iFontSize As Integer = 10 ‘//Change this as needed
    Dim bmpImage As New Drawing.Bitmap(1, 1)
    Dim iWidth As Integer = 0
    Dim iHeight As Integer = 0
    '// Create the Font object for the image text drawing.
    Dim MyFont As New Drawing.Font("Arial", iFontSize, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point)
    '// Create a graphics object to measure the text's width and height.
    'Graphics(MyGraphics = Graphics.FromImage(bmpImage))
    Dim MyGraphics As Drawing.Graphics = Drawing.Graphics.FromImage(bmpImage)
    '// This is where the bitmap size is determined.
    iWidth = MyGraphics.MeasureString(sImageTextMax, MyFont).Width
    iHeight = MyGraphics.MeasureString(sImageTextMax, MyFont).Height
    '// Create the bmpImage again with the correct size for the text and font.
    'bmpImage = New Drawing.Bitmap(bmpImage, New Drawing.Size(iWidth, iHeight))
    bmpImage = New Drawing.Bitmap(bmpImage, New Drawing.Size(iHeight, iWidth))
    '// Add the colors to the new bitmap.
    MyGraphics = Drawing.Graphics.FromImage(bmpImage)
    MyGraphics.Clear(Drawing.Color.LightGray)
    MyGraphics.TextRenderingHint = Drawing.Text.TextRenderingHint.AntiAlias
    MyGraphics.TranslateTransform(0, iWidth)
    MyGraphics.RotateTransform(270)
    MyGraphics.DrawString(sImageText, MyFont, New Drawing.SolidBrush(Drawing.Color.Black), 0, 0)
    MyGraphics.Flush()
    Dim stream As IO.MemoryStream = New IO.MemoryStream
    Dim bitmapBytes As Byte()
    'Create bitmap
    bmpImage.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg)
    bitmapBytes = stream.ToArray
    stream.Close()
    bmpImage.Dispose()
    Return bitmapBytes
    End Function
    20CF
    Hope you are clear with this. :)

  • Text not rendering properly

    Hi
    I've just completed a mock up for a client and for whatever reason all the 'L's' in the center section on the backside appear different from the remaining text. I selected all the text and used 'expand' but nothing seems to change the look of this character. I also sent the file to vistaprint for a proof and it comes back the same way..unacceptable. HELP ;-))
    http://www.auctionontario.ca/HSO_Mockup2.pdf

    http://forums.adobe.com/thread/609600?tstart=0
    And a digital softproof will show the same issue, but it will still print correctly, whicxh you can easily verify by importing it into Photoshop or exporting a bitmalp file from AI.
    Mylenium

  • CQ page is not rendering properly. It is not rendering HTML. It is showing HTML source code as is.

    On some of the pages, I am getting this weird behavior wherein page is not rendering properly. It is showing HTML source code as is. Could you please help me out? What could be the issue? And how can we get rid of the same?

    Check your component jsp page. it is possible that it is just plan file without directives <@ or you might have miss to close tag which is creating source as text to render
    Paste your jsp code in case you need further help
    Thanks,
    Ajit

  • KM, HTML file, Not rendering correctly

    Hi Everyone
    I have an html file that is stored in knowledge management.  The html file references few folders/images that are also stored in KM. When I create a KM Document iView, the HTML file shows; however, the various images/style sheet that is stored along with the html file KM do not appear.  Thus the html file is not rendering properly. 
    With this being said, I can create an URL iview and everything works as it should (the html file appears correctly with the necessary images).  The problem is that I am developing a solution for an external and internal facing portal, thus the URL iView option is not going to work for me.  I need to have a way for this KM html iView to display properly...perhaps with the KM Document iView template.
    Has anyone encountered an issue such as this and can offer assistance.  Again, the KM Document iView template will work, if the html file it is calling in KM can correctly reference other folders in KM that contain various images/style sheets that are a part of the html file.
    Any help is greatly appreciated.
    Best Regards,
    Scott

    Hi Scott.
    In order to solve your problem with relative links to image and css files inside KM I suggest two variants:
    1. Replace relative links as I mentioned in this message Re: JavaScript and CSS info in WPC.
    2.The second solution is:
    a. Create an blank html file inside KM folder where the base.html file is stored.
    b. Download the newly created file for local editing.
    c. Place an iframe that points to your base html file between <BODY></BODY> tags. Use a following code as an example:
    <iframe width="100%" height="100%" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="base.html"></iframe>
    d. Upload this file back to KM.
    e. Point your KM Document  iView to the created html file.
    Best regards,
    Aliaksandr Zhukau
    Edited by: Aliaksandr Zhukau on Dec 3, 2009 11:04 AM

  • Crystal report not rendering properly on Mozilla ?

    Hi,
    We are using VS2008,CR2008 on server 2012. In Chrome & IE CR working properly.
    But when I am using Mozilla with updated version not rendering properly.

    This is an old version of this issue that might give some insight:
    *[http://stackoverflow.com/questions/19768144/crystal-report-v10-5-toolbar-not-visible-on-firefox-but-visible-on-ie-and-chrome]
    also (but I am not sure what version you are using): " CR 10.5 is one of the versions that was not updated to support IIS7." from [http://www.experts-exchange.com/Database/Reporting/Crystal_Reports/Q_28350929.html]
    It might be ideal to ask a developer in stackoverflow.com or file a bug with webcompat.com for expert investigation for crystal reports. I am sorry I could not be more helpful.

  • PDFs not rendering properly with hpeprint or AirPrint

    Both my iPhone 4 and my iPad 2 connect to my LaserJet Pro 400 color MFP M475dn (connected via ethernet cable to an Apple Airport Extreme) and print most things just fine. However, when I use either hpeprint or Apple AirPrint options to attempt to print, PDFs are NOT rendered properly... the graphic logos appear ok on a PDF document, but text is a complete, incomprehensible mess. I have the latest firmware and software. Any ideas? Despite all the latest firmware and software, could it be a driver issue?Thanks in advance.

    Hi CTU_Agent, 
    Your LaserJet Pro 400 color MFP M475dn is a commercial product. I suggest posting in the forum for HP Business Support for a better chance at finding a prompt solution.
    You may find the commercial Laserjet board here.
    http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413
    Hope you find the help you need;
    RobertoR
    Remember ▼
    You can say THANKS by clicking the KUDOS STAR. If my suggestion resolves your issue Mark as a "SOLUTION" this way others can benefit Thanks in Advance!

  • Stylesheet not rendering properly on child site

    I have a stylesheet in the Style Library of a parent publishing site.  A Master Page in a child site is using the stylesheet, but the styles are not rendered properly.  I copied the same stylesheet and used it in an ASP.NET web form Master Page
    and the styles rendered properly.  I then created a basic HTML page and used that stylesheet and it worked out fine.  Why won't it work in SharePoint 2013?  Is there a clash with the default styles and can I disable the default styles?
    Thanks,
    Mike

    Hi,
    To use an External Stylesheet, you can reference it as what the links below suggests:
    http://techtrainingnotes.blogspot.jp/2012/05/adding-javascript-and-css-to-sharepoint.html
    https://www.nothingbutsharepoint.com/sites/eusp/Pages/Understanding-SharePoint-CSSLink-and-how-to-add-your-custom-CSS-in-SharePoint-2010.aspx
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • Command links are not rendering properly in panel collection toolbar facet

    Hi
    I am using jdev 11.1.2.3.0
    I added toolbar component to the toolbar Facet of panel collection component .
    Under the tool bar I added two command link components with name create and delete,
    the problem is at run time the buttons are not rendering properly,they are hiding,instead of links
    this symbol(>>) is displaying.
    On clicking the symbol,I am able to see the links,I used <af:spacer> after the links but not worked.
    what I have to do to render the links properly in the panel collection toolbar facet

    Hi Timo
    This is the code and I am using 11.1.2.3.0
         <f:facet name="toolbar">
                    <af:toolbar id="t1">
                            <af:commandImageLink icon="#{resource['images:create.png']}" text="Create" id="cbInsert">
                            <af:showPopupBehavior popupId="p1"/>
                        </af:commandImageLink>
              </af:toolbar>

  • Command links are not rendering properly in the toolbar facet of panel collection

    Hi
    I am using jdev 11.1.2.3.0
    I added toolbar component to the toolbar Facet of panel collection component .
    Under the tool bar I added two command link components with name create and delete,
    the problem is at run time the buttons are not rendering properly,they are hiding,instead of links
    this symbol(>>) is displaying.
    On clicking the symbol,I am able to see the links,I used <af:spacer> after the links but not worked.
    what I have to do to render the links properly in the panel collection toolbar facet

    Hi Timo
    This is the code and I am using 11.1.2.3.0
         <f:facet name="toolbar">
                    <af:toolbar id="t1">
                            <af:commandImageLink icon="#{resource['images:create.png']}" text="Create" id="cbInsert">
                            <af:showPopupBehavior popupId="p1"/>
                        </af:commandImageLink>
              </af:toolbar>

  • TaskMenu is not rendering properly using rendered attribute withSecurityCxt

    Hi All,
    I am trying to use this code rendered="#{!(securityContext.userInRole['ZPM_ENT_MARKETING_BUDGET_MANAGER_DUTY'])}" in the itemNode UI component of my Budget_taskmenu.xml. But UI is not rendering it properly.
    I have checked the same code in the backing bean and it is returning true and false as per expectation but at UI level my menu is not coming properly (it is coming as #{null} in place of name in menu).
    But same piece of code is working fine in my .jsff file where I am doing the same check in rendered attribute.
    rendered="#{!(securityContext.userInRole['ZPM_ENT_MARKETING_BUDGET_MANAGER_DUTY'])}"
    Any Suggestion.
    Regards,
    Sarvesh Kaushik

    Hi Frank,
    Thanks for your reply.
    But I found the actual root cause of the issue.
    There is nothing wrong in the expression rendered="#{!(securityContext.userInRole['ZPM_ENT_MARKETING_BUDGET_MANAGER_DUTY'])}".
    The actual issue with my code was one label name was wrong bcoz of which menu was not rendering properly.
    Thanks and Regards,
    Sarvesh Kaushik

  • Why are previews in Bridge blurry (not rendering properly)?

    Why are previews in Bridge blurry (not rendering properly)?
    I found a simple answer to this question: control click on the thumbnail and select "purge cache for selection"
    After years of intermittently having this problem, this solved the issue. I had just finished a fresh install of main sys hd (new hd) and first time opening bridge encountered this issue again after not having the problem for a few years.
    Hope this helps others.  

    Why are previews in Bridge blurry (not rendering properly)?
    I found a simple answer to this question: control click on the thumbnail and select "purge cache for selection"
    After years of intermittently having this problem, this solved the issue. I had just finished a fresh install of main sys hd (new hd) and first time opening bridge encountered this issue again after not having the problem for a few years.
    Hope this helps others.  

Maybe you are looking for

  • Problem in nest statement

    Hello, everyone, I have some problem to debug the following program. Please help. Many thanks. By the way, you need dept, emp and message tables to run it. CREATE TABLE MESSAGE(results varchar2(100)) set serveroutput on set verify off set echo off de

  • Could this be the battery?

    I have an 8300 Curve approximately 1 1/2 years old.  Every few days I will go to use the unit and find it completely dead.  If I take out the battery and put it back in the phone reboots and works fine... until the next time that it goes dead.  It al

  • Dump 'LOAD_PROGRAM_NOT_FOUND' while using QM02 and ZXqm02

    Dear All, We are facing dump LOAD_PROGRAM_NOT_FOUND at the time of QM02 and One Z transaction ZXQM02. Could you please tell me what should be the reason or what should be the remedy? Regards, AMAR

  • Where's the built-in input gone?

    I haven't used Garageband for a while and need to do some basic recording using the built-in input for real audio. When I go to select the input there is no option for built-in, only 2 mono options for mic and stereo mic. Where has the built-in optio

  • Db connection bottleneck

    from each db connection, i want to maximize the amout of data extracted. currently (machine #1): make db connection. read some data. create "object". send to machine #2. (machine #2): receive "object".make a db connection, read some data. i know the