0

I am trying to have a vertical scrollbar in the body of page. which should be implemented by css.

I don't want to use fixed height.

I used following code in my css:

.summary-scroll {
   overflow-y: scroll;
   overflow-x:hidden;
   height: 100%;
}

but it does not work. But when I add just an attribute named: layout="column" (without any need to have class attribute) the body has scrollbar.

I don't know what is the relation between layout and scrolling? Also I have to implement it in my css , what is the solution for handling in css file?

0

1 Answer 1

1

you can do like this

.body-scroll{ max-height:600px; 
             height: 100% !important; 
             overflow-y: scroll; 
              overflow-x: hidden;
} 
Sign up to request clarification or add additional context in comments.

5 Comments

I have tried that, by it still doesn't work. scroll just be visible when I set fixed height(like heigh:600px)
.body-scroll { max-height:600px overflow-y: auto; overflow-x: hidden; }<div class="body-scroll" layout="column"> <ng-content select="sei-body"></ng-content> </div>
.body-scroll{max-height:600px; height: 100% !important; overflow-y: scroll; overflow-x: hidden;} please try this
Thanks,it works now, is't any way to not use static size for height?I wanted to use just height:100% .
@Maryam Gharibi if it works fine for you can update point this answer Thanks !!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.