Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Posts
    364
    Thanks
    7
    Thanked 1 Time in 1 Post

    Aligning Background Image

    Can I give the left margin to background image in CSS ?

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello Uzair,
    I don't know if it's really margin but you can sure position it. Have a look at an example I made.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Posts
    364
    Thanks
    7
    Thanked 1 Time in 1 Post
    Why did write "background-image" twice ???
    Also tell me how can I give it different distance from right, bottom or top ???
    I mean... top: 50px; left: 100px; right: 10px; bottom 3px etc etc...

  • #4
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,673
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hmm, one didn't work and I forgot to delete it.

    Made the div bigger... play around with it and see what moves it the way you want.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •