gsamaras
gsamaras

Reputation: 73444

Textarea's style won't work with Mobile jquery

Following my question, I have some CSS, but because the textarea lies inside the div that plays the role of a page, it won't work have any effect. Can I somehow do that? The only think that matters to be is to get the border nice and to get the textarea relatively small (now it will take all the width of the screen), like in my fiddle.

textarea {
    display: block;
    box-sizing: padding-box;
    overflow: hidden;
    padding: 10px;
    width: 250px;
    font-size: 14px;
    margin: 50px auto;
    border-radius: 8px;
    border: 6px solid #556677;
    width: 30%;
}

Upvotes: 0

Views: 99

Answers (1)

Gajotres
Gajotres

Reputation: 57309

Remember, when working with jQuery Mobile, !important is your best friend. Without it you can't override aggressive jQuery Mobile CSS.

Working example: http://jsfiddle.net/3qaet2d2/

textarea{  
  display:block !important;
  box-sizing: padding-box !important;
  overflow:hidden !important;

  padding:10px !important;
  width:250px !important;
  font-size:14px !important;
  margin:50px auto !important;
  border-radius:8px !important;
  border:6px solid #556677 !important;
}

Upvotes: 2

Related Questions