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 3 of 3

Thread: Backgrounds

  1. #1
    Regular Coder
    Join Date
    Apr 2006
    Location
    UK, England
    Posts
    268
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Backgrounds

    I have a background I want to add to my page. Im using a table, and when I add the bg to the page, it seems to repeat the background in that cell. How can stop it being repeated?

    Also, is there any easy way to design the bg so that it fits in with the width of the cell? Sometimes I find myself having to strech the table or cell becuase the backgound doesnt fit in or show fully.

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,338
    Thanks
    29
    Thanked 282 Times in 276 Posts
    I think that this belongs in the HTML & CSS forum.

    You can stop a background from repeating by using applying the CSS background-repeat property to that table cell. Specifically, background-repeat: no-repeat.

    Background stretching won’t be available until CSS3 which, suffice it to say, is probably a very long way away. If you need a table cell’s dimensions to match those of the background image, then just set the table cell’s dimensions explicitly. If you need the cell to be able to expand beyond those dimensions then try using the min-width and min-height properties instead to define a minimum width and height.
    For every complex problem, there is an answer that is clear, simple, and wrong.

  • #3
    Regular Coder
    Join Date
    Apr 2006
    Location
    UK, England
    Posts
    268
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Well, Ive been told that using pixels isnt a very good idea, so Im using percentages insted. I guess if I was using pixels, I could have taken the spec in pixels in pasted them in photochop or whatever and made a background accordingly, then insert it into DW which should display it exactly.

    Would this be the same case for percentages aswell?


  •  

    Posting Permissions

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