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.

Ca't get image to move using CSS

Featured Replies

Hi folks,

 

I'm trying to understand why I can't shift what looks like an image in a wordpress template I've got. I can move the header contents but can't seem to shift the body image.

 

I have pasted the code below in the hope that it's something straightforward with the css. It is set up with a float left style and I have tried changing it to a position style, try adding padding style to it but all the moves is the content itself not the image.

 

Can anyone out there help point out how i get it to move (I only want it to shift a few pixels lower!) Let me know if you need more code or anything else, I'm just trying to limit pasting code that seems irrelevant.

 

Thanks

 

Andy

 

/* BODY */



#body{

width:100%;

float:left;

background:#ffffff url(images/body_bg.gif) no-repeat;

}



#body_left{

width:725px;

float:left;

padding-bottom:40px;

}



#body_right{

width:275px;

float:right;

}

Try add this to the last line of your #body styles:

 

background-position: 5px 10px;

 

where the first value, 5px is x co-ordniate from the top left of the screen, and 10px is the y co-ordinate. Change them to what you need to position it correctly.

 

Without seeing a link, however, this is just a stab in the dark based on what you posted. Do you have a URL?

If it the background image that needs moving something like this should work:

 

background:#ffffff url(images/body_bg.gif) no-repeat 10px center;

 

That should move the image 10px down.

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.