Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Lightbox text now scrolling

Featured Replies

*Title should be NOT scrolling, oops.*

 

Hi there,

 

I've been working on a website where I've used a simple lightbox for text to display more than will fit on the page, unfortunately for some reason the scrollbar isn't working and doesn't appear so you can't see all the text on the page below, click on "read more" and you'll see what I mean.

 

http://www.amtesting.co.uk/bshep/how-can-we-help.html

 

This is the CSS code I've used for it, can someone help me please??

 

.grayBox{

position: fixed;

top: 0%;

left: 0%;

width: 100%;

height: 100%;

background-color: black;

z-index:1;

-moz-opacity: 0.8;

opacity:.80;

filter: alpha(opacity=80);

}

.box_content {

position: fixed;

top: 5%;

left: 30%;

right: 30%;

width: 40%;

padding: 12px;

z-index:2;

overflow:auto;

color: #000;

}

 

Many thanks in advance.

 

Dan

Edited by Dan Lacey

  • Author

*Title should be NOT scrolling, oops.*

 

Hi there,

 

I've been working on a website where I've used a simple lightbox for text to display more than will fit on the page, unfortunately for some reason the scrollbar isn't working and doesn't appear so you can't see all the text on the page below, click on "read more" and you'll see what I mean.

 

http://www.amtesting.co.uk/bshep/how-can-we-help.html

 

This is the CSS code I've used for it, can someone help me please??

 

.grayBox{

position: fixed;

top: 0%;

left: 0%;

width: 100%;

height: 100%;

background-color: black;

z-index:1;

-moz-opacity: 0.8;

opacity:.80;

filter: alpha(opacity=80);

}

.box_content {

position: fixed;

top: 5%;

left: 30%;

right: 30%;

width: 40%;

padding: 12px;

z-index:2;

overflow:auto;

color: #000;

}

 

Many thanks in advance.

 

Dan

 

Can nobody help me with this?

Hi Dan,

 

The following CSS should work:

 

.grayBox{
position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.box_content {
position: absolute;
top: 5%;
left: 30%;
right: 30%;
width: 40%;
padding: 12px;
z-index:2;
overflow:auto;
color: #000;
} 

 

it is a simple change for the positioning of the content (position: absolute;)

 

Hope that helps!

Iain

  • Author

Hi Dan,

 

The following CSS should work:

 

.grayBox{
position: fixed;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index:1;
-moz-opacity: 0.8;
opacity:.80;
filter: alpha(opacity=80);
}
.box_content {
position: absolute;
top: 5%;
left: 30%;
right: 30%;
width: 40%;
padding: 12px;
z-index:2;
overflow:auto;
color: #000;
} 

 

it is a simple change for the positioning of the content (position: absolute;)

 

Hope that helps!

Iain

 

Yeah that worked a treat thanks!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.