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.

CSS please help

Featured Replies

Hi,

 

For the header graphic on my website I use the following CSS:

#header

{

margin : 0 1px;

background : url('images/header3.jpg') top;

height: 400px;

}

 

with HTML of

<div id="header">

 

so far so good, I would like to have a diffrent header on each page so what I have done is I created

#header2

{

margin : 0 1px;

background : url('images/header2.jpg') top;

height: 400px;

}

 

with HTML of

<div id="header2">

 

but when I view the page there is nothing in the header any reason why. the header.jpg file is at the correct place ect.

 

Thanks

Do it like this, and you don't need the top bit as it will automatically be at the top.

 

background-image: url(images/header2.jpg);

  • Author
Do it like this, and you don't need the top bit as it will automatically be at the top.

 

background-image: url(images/header2.jpg);

 

Thanks Dizi do I put that in the css or html

CSS

 

have it like this

 

#header2
{
margin : 0 1px;
background-image: url(images/header2.jpg);
height: 400px;
}

Your css said

#header2 
{
margin : 0 1px;
background : url('images/header2.jpg') top;
height: 400px;
}

when I changed it to

#header2 
{
margin : 0 1px;
background : url('images/header2.jpg');
height: 400px;
}

then it worked fine. Your shorthand syntax wasn't valid.

 

But that image is insanely large. it's just a test image, right?

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.