Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to change font size of static text item...?

    I am a newbie to gwt...I need to change the font size of static text item.I tried to do it by using the method " setTextBoxStyle("h1") " as below in my "GwtProj.java" file

    Code:
            StaticTextItem heading=new StaticTextItem();
            heading.setDefaultValue("Enter School Information");
            heading.setTextBoxStyle("h1");
    In the above code,"h1" means base css class ...where it looks like below in my "GwtProj.css" file.

    Code:
    h1 {
      font-size: 2em;
      font-weight: bold;
      color: #777777;
      margin: 40px 0px 70px;
      text-align: center;
    }
    I haven't altered anything in my "GwtProj.gwt.xml" file.should i do any modifications overthere...?

    Where did I go wrong in the procedure above...?please help...

    #2
    I resolved the issue to some extent...I have changed the java file and the css base class in the following way
    Code:
            StaticTextItem heading=new StaticTextItem();
            heading.setDefaultValue("Enter School Information");
            heading.setTextBoxStyle("heading");
    css base class is as follows...
    Code:
    .heading{
    	font-size: 2em;
    	font-weight: bold;
    }
    But even after that...I am getting a textbox like thing around my heading " Enter School Information ".It looks like a noneditable textbox.
    Can anyone please suggest me,how to get rid of that one...?

    Comment

    Working...
    X