Chetan
Chetan

Reputation: 11

CSS for Fixed Width and Scalable Height

How to make a text box fill the entire length of the side bar whose length is not fixed? Width= 250px

<div id="Text-box"><div/>

Please suggest CSS for height.

Upvotes: 0

Views: 1158

Answers (2)

Trion
Trion

Reputation: 580

First approach should be to use

height: 100% That will make the element's height take 100% of height of its parent

If you want to take height of the view, you can consider

height: 100vh

Upvotes: 1

Daniel Lowe
Daniel Lowe

Reputation: 36

Your question is a bit vague and this answer a little bit trivial, but have you tried:

height:100%;

Upvotes: 0

Related Questions