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.

Background Image in adapted three column layout

Featured Replies

HI,

 

I am trying to adapt a three column layout that I copied from the tutorials on this site. So far it seems to be working OK. But when I try to drop a background image in to the right column the image does not show because there is no text in the right column. If I add text part of the image shows. Is there a way I can use this image and get it to appear properly without adding text to the right column.

 

Here is the CSS:

 

#right {

background-image: url(../images/leaf.gif);

background-repeat: no-repeat;

border: 1px solid pink;

padding-top: 10px;

padding-right: 20px;

padding-bottom: 10px;

padding-left: 20px;

height: auto;

width: 160px;

float: left;

margin-top: 0px;

margin-right: 0px;

margin-bottom: 0px;

margin-left: 6px;

 

Many thanks,

 

Slooshy

you will have to define an actual height to your css, as auto won't detect how big you need it to be.

this seems like a stupid question, but why have a column with nothing in it?

 

The solution is to fix the dimensions, much like the width is set at 160px, set the height to whatever you want it to be, eg 400px (replaces the word 'auto') and the column will be instructed to stay these dimensions high and wide.

 

The problem of course is that if whatever content is going in there is changing a lot, then you risk running out of room.

  • Author
this seems like a stupid question, but why have a column with nothing in it?

 

The solution is to fix the dimensions, much like the width is set at 160px, set the height to whatever you want it to be, eg 400px (replaces the word 'auto') and the column will be instructed to stay these dimensions high and wide.

 

The problem of course is that if whatever content is going in there is changing a lot, then you risk running out of room.

 

 

Oh Fantastic! It works! You don't know how crazy this was making me. Thankyou. :D

excellent.

just remember that background images count for nothing as far as content is concerned. A div with a bg image will need other coded content in order for it to be visible.

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.