Inheriting -fx-text-alignment CSS Property

Hello,
I am referring to the Inheritance section in the following document:
http://docs.oracle.com/javafx/2/api/javafx/scene/doc-files/cssref.html#typefont
The document states that the three CSS properties are inherited by a node from its parent, by default:
-fx-cursor
-fx-text-alignment
-fx-font
The following program is to demonstrate the above CSS rule.
package test;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
import javafx.scene.text.Text;
import javafx.stage.Stage;
public class Test extends Application {
     public static void main(String[] args) {
          Application.launch(args);
     public void start(Stage stage) {
          VBox root = new VBox();
          root.setStyle("-fx-cursor: hand;" +
                        "-fx-text-alignment: right;" +
                        "-fx-font: normal bold 20px \"serif\"");
          Label lb2 = new Label("Just adding a long text to test the text alignment:");
          lb2.setWrapText(true);
          //lb2.setStyle("-fx-text-alignment: inherit");
          Text t2 = new Text("This is a big text for the Text node");
          lb2.setPrefWidth(100);
          t2.setWrappingWidth(50);
         //t2.setStyle("-fx-text-alignment: inherit");
          root.getChildren().addAll(lb2, t2);
          Scene scene = new Scene(root);
          scene.getStylesheets().add("resources/css/hjfx.css");
          stage.setScene(scene);
          stage.setTitle("Test");
          stage.show();
}I have the following questions:
1. The -fx-text-alignment property is not inherited by default by the Label and Text nodes. If I specify the value as inherit, it works as expected.
2. The textAlignment property is not just defined in the Text class. It is also defined in the Labeled class. The font property is not defined in the Font class either. Why does this document refer to these classes in the table in the Inheritance section?
3. Can someone give me an example of what does this document mean by stating that -fx-text-alignment property is inherited by nodes from their parents, by default.
Thanks
Kishori

These are either bugs in the document or bugs in the code. Would you mind creating an issue in JIRA (http://javafx-jira.kenai.com/) to track this?

Similar Messages

  • SSRS- Span tag with text-align CSS property

    Hi All,
    I hope you can direct me.
    If I use the text box as HTML - Interpret HTML tags as styles, and write the following in it:
    "<p style='text-align: right';>Ghada Naim</p>"
    It works correctly ,but the following do not respond to the style:
    "<span style='text-align: right';>Ghada Naim</span>"
    Please, what is the problem? Is the span tag with  SSRS does not support to text align property or what?
    Thank you,

    Hi GhadaNaim,
    In Reporting Services, the following is a complete list of tags that will render as HTML when defined as placeholder text:
    Hyperlinks: <A HREF>
    Fonts: <FONT>
    Header, style and block elements: <H{n}>, <DIV>, <SPAN>,<P>, <DIV>, <LI>, <HN>
    Text format: <B>, <I>, <U>, <S>
    List handling: <OL>, <UL>, <LI>
    We can know that the <SPAN> tag is supported. Based on my further research, the <span> tag is used to group inline-elements in a document and it provides no visual change by itself. So we couldn’t directly see its respond in report.
    For more information about HTML <span> Tag, please refer to the following document:
    http://www.w3schools.com/tags/tag_span.asp
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong 
    Katherine Xiong
    TechNet Community Support

  • New to CSS, text-align and line-height ok in 'Design', but not in browsers (IE 10 & Chrome) on Win8

    [DREAMWEAVER CC]
    I'm now learning CSS, and find that where I specify in an external style sheet
    h1 {
              font-family:Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", serif;
              text-align:center;
              color: black;
              font-size: 1em;
              font-weight: normal;
              font-style: normal;
              line-height: 3.0;
              letter-spacing: 0px;
              word-spacing: 10px;
    text-shadow: 3px 3px 5px #333;
    text-decoration: none ;
    text-transform: none;
    That, in DW Design, they look fine, but in Windows 8, IE 11 and ChromeVersion 31.0.1650.63 m   that the text-align: center; and the line-height: 3.0;  are ignored.
    I work around by specifying <tr align="center" height = "77">   shouldn't the text-align: center; and the line-height: 3.0;  be specifiable in my CSS??
    Thanks for any help!
    <tr height="77" align="center">
            <h1>
                <td bgcolor="CornSilk">1/28/2014</td>
                <td>the Sky</td>
                <td>Fate is the Hunter</td>
              <td >Ernest Gann</td>
                <td >John</td>
                <td >Jessica</td>
              <td><a href="http://www.amazon.com/FATE-HUNTER-Ernest-K-Gann/dp/0671636030/ref=sr_1_1?s=books&ie=UTF8&q id=1387462831&sr=1-1&keywords=ernest+gann">Learn More</a></td>
            </h1>
        </tr>

    hemmi1 wrote:
    [DREAMWEAVER CC]
    I'm now learning CSS, and find that where I specify in an external style sheet
    Not sure what it is you are trying to do but what you have at the moment is invalid code which is most likely why it doesn't work cross browser. (of cousre this css does not help  - line-height: 3.0; - 3.0 what? - px, ems?)
    Here's an example below of how you could do it. Give your table a class (below it is called .myTable) then you can start styling the <td> cell, and anything inside it by appending the element like an <h2> tag to the class name - .myTable h2
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Untitled Document</title>
    <style>
    .myTable {
        width: 900px;
        margin: 0 auto;
    .myTable td {
    font-family:Baskerville, "Palatino Linotype", Palatino, "Century Schoolbook L", "Times New Roman", serif;
    width: 150px;
    .myTable h2 {
        margin: 0;
        padding: 0;
    text-align:center;
    color: black;
    font-size: 1em;
    line-height: 50px;
    word-spacing: 10px;
    text-shadow: 3px 3px 5px #333;
    .myTable a {
        display: block;
        text-align: center;
    </style>
    </head>
    <body>
    <table class="myTable" cellpadding="0" cellspacing="0" border="0">
    <tr>
    <td><h2>1/28/2014</h2></td>
    <td><h2>the Sky</h2></td>
    <td ><h2>Ernest Gann</h2></td>
    <td ><h2>John</h2></td>
    <td ><h2>Jessica</h2></td>
    <td><a href="http://www.amazon.com/FATE-HUNTER-Ernest-K-Gann/dp/0671636030/ref=sr_1 _1?s=books&ie=UTF8&qid=1387462831&sr=1-1&keywords=ernest+gann">Learn More</a></td>
    </tr>
    </table>
    </body>
    </html>

  • Table (css) text align in ff

    does anybody know of an issue where setting a table class
    with text-align attributes won't center the text of the table in
    firefox?
    I can force it to center by adjusting the align attribute in
    the <table> tag, but i have a several tables that i would
    like to keep control of in my stylesheet... i found a similar
    situation on a forum through google, but ended just suggesting to
    wrap it in a <div align="center">... Of course i can just set
    the table attributes, but i figured i'd check with y'all
    first...

    > oh! i see, that all makes sense now... hence the "root"
    in root relative
    > :)
    To quote Homer, "d'oh".
    > while we're on the subject, is there a preferred file
    extension for ssi?
    The parent file must be named with an shtm(l) extension IF
    you are using
    HTML/ASP includes, and IF your host has not enabled
    server-parsing for all
    files. If you are using PHP includes, then the parent file is
    names with a
    *.php extension, and so on (for CF/JSP/.Net).
    The file being included can have any filename extension you
    prefer - I like
    *.monkeybutt myself, but that's just me.
    > because when i
    > saved them as .html, dw added all the doctype and head
    markup...
    > or is the problem in a setting in dw?
    I don't think this is what you did. DW doesn't add that when
    you save, it
    adds that when you create the file. I usually create a plain
    text file,
    copy and paste the code to be included, and then (depending
    on the code
    type) save it with an appropriate extension (notwithstanding
    my penchant for
    monkeybutt), so that the code is properly colored by DW.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "m0piqsutjjqv4du" <[email protected]> wrote
    in message
    news:ejn1qm$6dh$[email protected]..
    > oh! i see, that all makes sense now... hence the "root"
    in root relative
    > :)
    >
    > while we're on the subject, is there a preferred file
    extension for ssi?
    > i've been using .txt (which DW is obviously not managing
    links) because
    > when i
    > saved them as .html, dw added all the doctype and head
    markup...
    > or is the problem in a setting in dw?
    >

  • How to change the text alignment of an adf table column

    Hi everyone
    I have a read only adf table that uses banding. What I want to do is change the text align property of one of it's columns but the task seems not at all trivial.
    I tried entering a value for the text-align property in the inline style of the specific af:column tag and failed. I then tried to do the same for the af:outputText element inside the column but still nothing worked. I even created a css style and changed the StyleClass attribute on each or both elements without any luck.
    Can anybody shed some light here ...
    Thanassis

    Specify the text-align in a css.
    Re: styling column headers in adf table

  • Is it possible to style texts via CSS file?

    I have the feeling that AS3.0 will not work with complex CSS styling, correct? I'm creating some div tag and I want to style the div tag. Will AS3 work with div tag?

    no.  these are the supported tags:
    CSS property ActionScript property Usage and supported values
    text-align
    textAlign
    Recognized values are left, center, right, and justify.
    text-decoration
    textDecoration
    Recognized values are none and underline.
    margin-right
    marginRight
    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.
    kerning
    kerning
    Recognized values are true and false.
    letter-spacing
    letterSpacing
    Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent.
    font-family
    fontFamily
    A comma-separated list of fonts to use, in descending order of desirability. Any font family name can be used. If you specify a generic font name, it is converted to an appropriate device font. The following font conversions are available: mono is converted to _typewriter, sans-serif is converted to _sans, and serif is converted to _serif.
    display
    display
    Supported values are inline, block, and none.

  • Text Align and Other annoyances

    I have upgraded from CS3 to CS5 and while i am mostly happy there are some really annoying bugs, features, or pieces of ill thought out logic in Dreamweaver.
    I might be wrong but by default Dreamweaver is a a WYSIWYG editor. Therefore this should make it ideal for editing websites which have text in them. Lets assume that websites include single email campaigns, small static HTML brochure sites, through to large scale CMS websites. In each of these cases i might have the need to align a single piece of text to the right.
    Now DW suggests everything like this should be driven by CSS. In in 90% of cases for general text layout i would agree i.e. default paragraph text size, default alignment, default line spacing, etc. These can then easily be adjusted throughout the website large or small by changing a simple bit off CSS in your style sheet.
    But what if you just need 1 line of text to be different from "default" - CSS is not approrpiate here, and infact it would result in more code to achieve the same goal. why should i have to write a new style into my style sheet, and then link it with a class name, when a simple align="right" will work in that instance. In fact in all instances the chances are that piece of code will be shorter than the class="text-right" definition to apply the CSS (ignoring the CSS code too).
    So why take the align buttons off the property inspector bar? Why make the developers life harder when he is using a tool to make it easier?
    Another issue - which probably is more of a bug than anything. In code, Shift + Tab should outdent the code right. Highlight a block of code and this works. Why then does doing this for a single line of code delete the code?
    I upgraded from CS3 because i was told that was the worst performing version of creative suite out there. And it was buggy as hell. But i am now finding that CS5 is not a great deal better - this applies through the other products too with Illustrator crashing as much as it ever did, il thought out removed features, etc. I am appalled by the quality of the new CS5 - especially as in my upgrade the fee was a good 30% more expensive than the american alternative.
    And before you ask - the machine where i am experiencing this is more than adequate, Quad Core, 6gig of Ram, and on a fresh install of Windows 7.
    An unhappy customer.

    You may need to adjust your workflow to get the most out of CSS.
    I find it works much better to identify the CSS IDs, selectors and class names I will be using in the site.  This bit of pre-planning gives me a basic stylesheet from which I can grab styles at will and add more to as needed.
    /**BASIC LAYOUT**/
    #wrapper { }
    #header { }
    #content { }
    #footer { }
    /**TEXT STYLES**/
    #header h1 { }
    #content h2 { }
    #content h3 { }
    #content p { }
    #footer p { }
    /**RE-USABLE CLASSES**/
    .floatLt {float:left; width: 40%;}
    .floatRt {float:right; width: 40%}
    .clearing {clear:both}
    .center {text-align:center}
    .right {text-align:right}
    /**LINKS**/
    a { }
    a:link { }
    a:visited { ]
    a:hover,
    a:active,
    a:focus { }
    And if you plug all this into an external CSS file to which your HTML documents are linked, sitewide style changes take a minute or two instead of weeks and hours.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Inline text-shadow style property missing

    Hi, I'm wondering if anyone has come across this as I'm at a loss trying to debug it.
    I create a composition with text that has a text-shadow. The text shadow is there when I preview in IE11. I upload to my own site and it works fine.
    Update: I've checked the composition in the LCMS on other browsers and the text-shadow is there. Looks like it could be an IE issue.
    However, when I upload to my clients LCMS, all works correctly, except there are no text-shadows. When I inspect the code produced, the inline text-shadow style property is missing i.e. it is not hard coded in! Everything else is as expected.
    In order to deploy the composition to my clients LCMS, I have to change some image url's but otherwise, there are no differences.
    I can't work out why the JavaScript is not writing the text-shadow to the elements.
    Does anyone know where I can put checks in my JS to see what is happening?
    Thanks for any help.
    Cheers,
    Patrick

    Of course, text shadows are not supported in IE9 in particular. I am not sure whether filter is still supported though. You might want to check that out.
    Try using filter instead in your css code like:
    filter: progid:DXImageTransform.Microsoft.Shadow(color=#000000,direction=45);
    Note: keep text-shadow for the other browsers too.
    Hope it works but I make no promise.

  • JDeveloper 10.1.3.4: text-align for table column has no effect

    Hi,
    I am using JDeveloper 10.1.3.4. In a tabe I have a column that displays numbers, which are left-aligned by default:
    Applied
    $50.00
    $2,160.00
    $50.00
    $2,260.00I want to have them aligned to the right to look neater:
    Applied
             $50.00
          $2,160.00
             $50.00
          $2,260.00Or better still, have the cell with the longest string aligned to the center, and all the other cells align to it by the decimal point:
        Applied
          $50.00
       $2,160.00
          $50.00
       $2,260.00I looked in the property inspector and the only thing that looks closest to the purpose is text-align. I set this attribute to right (text-align:right) for the column, and for the outputText, but neither has effect. Everything is still flush to the left. How to get it right?
    Thanks!
    Newman

    Hi, Branislav,
    Nice meeting you again.
    Last time the question was about formatting the total amount returned from the method, from String to Number, Re: JDeveloper does not handle expert SQL, cannot add query clause in view link, which can also format the number as currency.
    This time, your answer again solved my problem. I was looking in the inline styling section, and did not notice this property in the General section. Thank you so much for your help!
    Newman

  • Spry bar text alignment

    I need help with aligning text in main spry bar menu. Using DW 5.5, I have a 7 bank bar and 2 have 2 lines, remainder have 1. I need to BOTTOM align everything. I've look through forums, help menus, and u-tube and can not find this answer.
    I would also like to not have fixed widths, but widths varied per text length, but when I do that, obviously the 2 lined text banks turn into one line.

    To give you an idea of what I would do, have a look at the following by copying and pasting into a new document.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Therapy To Go Home Page</title>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet">
    <style>
        margin: 0;
        padding: 0;
    html {
        background: #FFF;
        height: 100%;
        color: #000;
        font: 100% Verdana, Geneva, sans-serif;
    body {
        background: #FFC;
        width: 800px;
        margin: auto;
        font-size: 0.85em;
    #header {
        height: 148px;
        background: #C2A4FF;
    #nav {
        background: #EEE;
        height: 3.6em;
    #aside {
        width: 197px;
        float: left;
        padding: 20px;
    #article {
        margin-left: 240px;
        padding: 20px;
        background: #C2A4FF;
    ul.MenuBarHorizontal li {
        font-size: 1.05em;
        width: auto;
        text-align: center;
    ul.MenuBarHorizontal a {
        background-color: #EEE;
        padding: 0.5em 1.1em;
        color: #333;
    </style>
    </head>
    <body>
    <div id="header">
    </div>
    <div id="nav">
      <ul id="MenuBar1" class="MenuBarHorizontal">
        <li><a href="#"><br>Home</a>    </li>
        <li><a href="#"><br>Services</a></li>
        <li><a href="#">Benefits &amp;<br>Contraindications</a></li>
        <li><a href="#">Common  <br>Q&amp;A</a></li>
        <li><a href="#"><br>Pricing/Hours</a></li>
        <li><a href="#">Contact/About<br>Melanie</a></li>
        <li><a href="#"><br>Resources</a></li>
      </ul>
    </div>
    <div id="aside">
    <h2>This is the sidebar</h2>
    </div>
    <div id="article">
    <h1>This is the main article</h1>
      <p>Consectetur adipisicing elit, in reprehenderit in voluptate excepteur sint occaecat. Ullamco laboris nisi ut enim ad minim veniam, velit esse cillum dolore. Mollit anim id est laborum. Sed do eiusmod tempor incididunt qui officia deserunt cupidatat non proident.</p>
      <p>Quis nostrud exercitation in reprehenderit in voluptate lorem ipsum dolor sit amet. Ut aliquip ex ea commodo consequat. Velit esse cillum dolore mollit anim id est laborum. Consectetur adipisicing elit.</p>
      <p>Ut enim ad minim veniam, ullamco laboris nisi duis aute irure dolor. Eu fugiat nulla pariatur. Qui officia deserunt in reprehenderit in voluptate cupidatat non proident.</p>
    </div>
    <script>
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1");
    </script>
    </body>
    </html>
    Gramps

  • TableView: column header text alignment?

    How can I change the text alignment of a TableView column caption/header? I'd like some of my column headers to be right aligned for example?
    It works for regular table cells when I change f.i. the css of the custom DataFX MoneyTableCell cell:
    .money-cell {
       -fx-alignment: TOP_RIGHT;
    }but it won't work for the ".table-view .column-header" style of the standard TableView:
    .table-view .column-header,
    .table-view .filler,
    .table-view .column-drag-header {
        -fx-alignment: TOP_RIGHT;
    }

    Just after raising this I realised the problem is that the text is a label on top of the header. You can right align by using the following selector:
    .table-view .column-header .label {
        -fx-alignment: TOP_RIGHT;
    }

  • Text Alignment - Image Captions

    I am trying to set up a wiki page with various images, and wanted to provide each image with a caption (displayed underneath). What is the best way to achieve this? I haven't seen any options for text alignment in the wiki, and it strips my CSS attributes out.
    Ideas?

    I have been able to solve this in the following manner:
    1) Switch to code view by clicking on the "" button.
    2) Add your image that will have a cation using the following syntax:
    The longdesc attribute will be used as the target location in case you want to link it (I haven't yet figured out how to make the link work in the same browser without opening a new window).
    The key here was to use the thumbnail class.
    Any other thoughts or insights that you may have related to this?
    Thanks!
    -Mike
    Message was edited by: Miggl

  • Why won't my text align right in Live View or Browsers?

    I created a class called .reviewer so the the name of the reviewer would align right while the the review itself remains aligned to the left. I applied the class to the reviewer's name and in design view, it looks perfect. But in Live view and when I preview in a browser, the text remains aligned left. I put this class in two external style sheets, main.css and mainReviews.css.
    The page in question is: www.jillgrovemezzo.com/reviews.htm
    To be more specific, the text I want to align right under the first review is "Lawrence A. Johnson, Chicago Classical Review"
    Regina

    Add display: block; to your css class .reviewer (as shown below).
    .reviewer {
        text-align: right;
        display: block;

  • Changing .css property through external Javascript file?

    Hi,
    I'm trying to create all kinds of functions on an external .js file, so I can just call them in Edge multiple times with less coding. The thing is, after importing jQuery and my external Javascript file, some code works, but I get stuck at this part: changing the .css property of a symbol, more specifically, the "font-size" property. My current function is:
    function setFont(textid,fontsize,originalWinWidth){ //textid: symbol's name; fontsize: current font size of this symbol; originalWinWidth: window size at the start of the animation
    console.log("Set Font:");
    //set the original font size
    var originalFontSize = Math.round(originalWinWidth/fontsize);
    console.log("Original Font Size: " + originalFontSize);
    console.log("Text ID: " + textid);
    //set the font size using jquery
    sym.$(textid).css("font-size", originalFontSize);  }
    I get an error at the last line, all other parts of the code works. Any idea what this could be?
    Thanks,
    Rafael Carignato

    Have you tried sending textid to the console.log to make sure you're sending the actual name of the symbol and not a pointer to the symbol itself?
    -Elaine

  • Text alignment "Justify" is not aligned in Crystal Viewer.

    Hi,
    I am having a text field in report like paragraph format in Detail section and I have setting the text alignment as u201CJustifyu201D. If I launch the report through dhtml viewer the text is not aligned in justify format, it is getting aligned as left alignment, but it is working properly while exporting to PDF and Design Preview panel.
    This problem is occurs in Crystal Report XI Release 2 and Crystal Report 2008 also.
    This has been already posted and the link is Text Alignment - Justification Problem
    Please help me to overcome this issue.
    Thanks in Advance.

    With CR 2008, make sure you are on SP4:
    SP4
    https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
    SP4 MSI
    https://smpdl.sap-ag.de/~sapidp/012002523100008782532011E/cr2008sp4_redist.zip
    SP4 MSM
    https://smpdl.sap-ag.de/~sapidp/012002523100008782522011E/cr2008sp4_mm.zip
    If that does not help, please provide a link to screen shots of the issue.
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

Maybe you are looking for