Cory's profile picture

Published by

published
updated

Category: Art and Photography

🖥 CSS Snippets: Put Things In Scroll Boxes

OK, let's make some things that are generally long scroll so your page isn't as long!

Your Comments Section
This is CSS. It should go with the rest of your CSS styles.

.comments-table{
display: block;
height: 200px;
overflow-y: scroll;
}

Any Text Box
This is HTML, to make a scroll box wherever you'd like. Change the Background Color to the hex color of your choice, and the Color (the font color) to the hex color of your choice.

<div style="height:200px;overflow-y:scroll;background-color:#000000;color:#FFFFFF;">
Anything you'd like to put in here, including images or text.
</div>

Remember: always put any CSS in between two Style tags: <style></style> That way, browsers will recognize that what you're trying to do is adjust the style. Also remember that CSS stands for Cascading Style Sheets, so the browser will activate styles from top to bottom!


89 Kudos

Comments

Displaying 3 of 3 comments ( View all | Add Comment )

Polentitaaasada!ඞ

Polentitaaasada!ඞ's profile picture

thanks :DD


Report Comment

LeiePotato123

LeiePotato123's profile picture

thank you so much!!


Report Comment

ciderpies

ciderpies's profile picture

do you know how to change the font in the scrollboxes?


Report Comment