3

I make a small chat. There was a problem with CSS, because I'm more a programmer than a layout designer.

HTML:

<div class="chat_input_box">
<input type="text" class="chat_input_text" name="message">
<input type="submit" value="Отправить" class="chat_submit_button">
</div>

CSS:

.chat_input_box {
width: 100%;
}

.chat_input_text {
width: 83%;
}

.chat_submit_button {
margin-right: 0px;
}

The problem is that it is not goes to set the width of the text field maximum without hardcode (83% for example).screenshot

Ticksy
  • 561
  • 2
  • 10
  • 19
  • possible duplicate of [How to stretch the width of an element, so that it's 100% - widths of its siblings?](http://stackoverflow.com/questions/3682649/how-to-stretch-the-width-of-an-element-so-that-its-100-widths-of-its-siblin) – BoppreH Apr 12 '14 at 07:02
  • This might be the solution: http://stackoverflow.com/a/8765917/252218 – BoppreH Apr 12 '14 at 07:03

2 Answers2

0

try to put button and input filed into two different divs. Give button div CSS parameter "float: right; width: someAmount px;"

Sergei Kutanov
  • 825
  • 6
  • 13
0

Not really what you asked for, but as close as possible: http://jsfiddle.net/TQvg8/

dfsq
  • 191,768
  • 25
  • 236
  • 258