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.

Why isn't the background expanding as this div tag expands?

Featured Replies

The problem is, I have set the height of this div tag to auto, using CSS. But when I view the page in the web browser, the background doesn't fill the entire div tag. It does expand as the div tag expands, but there is a small section at the bottom of the div tag where there is no background, so the background colour doesn't fill the div tag entirely.

 

This is the CSS code I have for this div tag.

 

#textnoimage {
position: relative;
width: 995px;
height: auto;
overflow: visible;
float: top;
top: 0px;
left: 0px;
min-height: 100px;
background-color: #FFF;
padding-left: 5px;
color: #000;
}

Could someone tell me what I need to do to fix this please?

 

Thank you for your help.

It's hard to help without a link/picture or without seeing your HTML.

 

Have you tried setting your height to 100% rather than auto?

 

If you can post a pic as well as your HTML then that would be more useful.

EDIT: Just realized your not using a background image so please disregard my suggestion below.

As Alluziion said it's hard to help without seeing the code. maybe you have a background-repeat:none propperty assigned to all your div tags or on a class that your div shares. try this:

background-repeat:repeat;

Edited by Nillervision

The float property doesn't have a value "top". Or am I missing something?

 

Yeah the CSS isn't great... they also have "top" and "left" both with the value of 0px whilst it's being positioned relatively which more or less does nothing... they should change the positioning to absolute although this shouldn't be necessary either if they doing it right.

Edited by Alluziion

  • Author

Thank you for your help everyone, I can't seem to find out what the problem is, so I've decided to start all over again and see if I can do it again without this problem.

  • Author

Thank you for your help everyone, I can't seem to find out what the problem is, so I've decided to start all over again and see if I can do it again without this problem.

I didn't get very far with it, so I won't be wasting much time.

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.