• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSF: positioning textareas align:left doesnt work

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I am trying to make a question and answer form: I have managed to put the question along the left margin but the text area where the user will write their answers come right in the middle. Or at least not with the margin. I have attached the jpegh of how it looks and how I am writing the xhtml page is below:




If i remove the s:decorate tag which is actually a seam tag then it aligns ok, the seam tag wraps around the inputtextarea to show any errors in red in case the validation fails. So if i remove that then it aligns but then there is no ajax validation. Is there a way i can have both.

I will really appreciate that. I am not that good with UI and html.

Thanks
Sid.
question-textarea.PNG
[Thumbnail for question-textarea.PNG]
Text area coming in middle
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The syntax of what you're are putting in the style= attribute does not look familiar to me,
it is supposed to be CSS but what you have doesn't look correct. In CSS you would have
text-align: left. You should really spend at least a little effort learning the basics before you
come on here asking questions IMHO.
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tell me a little about what you're trying to do, what your skills are, where you're having
problems, and I'll lend a helping hand to point you in the right direction. A lot of people
have done the same for me and it's the least I can do.

Regards,
Brendan.
 
Syed Mahdi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Brendan Healey wrote:
Tell me a little about what you're trying to do, what your skills are, where you're having
problems, and I'll lend a helping hand to point you in the right direction. A lot of people
have done the same for me and it's the least I can do.

Regards,
Brendan.



Sorry for the late reply, I moved on to other bugs in the system as this was only a UI issue.

really appreciate your help: Its a seam decorate tag, I got the attribute align from searching on the net. I am not really into the UI and web designing so I dont use CSS that much so i was not familiar with it i guess.. you are right what ever one does ppl shud try to learn the basics at least. I am not really very expert on CSS and I saw that at some places it actually did use align=left so i thought the same attribute can be used in the style.


what I am trying to do is to place the <h:inputTextarea> to not come in the center. Right now if you see the text area in the image, it comes in the center while the bold textual question comes left aligned. I also tried to do :



But this doesn't work either the text area still comes in the center of the page. That might be becuase there is a red * (for required = true) but even if it is not a required=true it still comes in the center.

I will appreciate your help.
Thanks.
Syed
 
Brendan Healey
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ok, first thing is that your CSS syntax is completely wrong. You would use something like this:



the syntax is attribute: value; attribute: value; etc...

The second thing is that it's not going to help you anyway. The styling will only apply to the
contents of the inputTextarea, not the positioning of the component itself. The question that
needs to be answered is why is the component being centred? It must be picking up some
styling from somewhere, but without seeing your stylesheet or the outlying code I couldn't
say more. Which browser are you using? There are ways of debugging this easily. If you
have a stylesheet do you have anything with the word "input" in there?

Brendan.
 
Syed Mahdi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
umm how is my syntax wrong.... its the same way you wrote

Anyways

I used the chrome Inspect element feature and then saw where this space is coming from CSS files. and changed it there.

the layout edit.html that was part of it had it so made a new editb.html and used it here with the change.

Thanks for the help.
reply
    Bookmark Topic Watch Topic
  • New Topic