www.webdeveloper.com
Results 1 to 3 of 3

Thread: How to scale a picture

  1. #1
    Join Date
    Jul 2010
    Posts
    17

    How to scale a picture

    Hello
    In my page i have a bg pic. This pic i say it to repeat in all page but the problem is that i want to repeat the y and the x to scale only 450px.
    Here is my code pleace help i stack

    Code:
    #main		{ background: url(.../main_bg_transparent.png) repeat top; min-width: 450px;}
    But it doesnt work

  2. #2
    Join Date
    Mar 2010
    Location
    Singapore
    Posts
    367
    Quote Originally Posted by dj_kostas_pro View Post
    min-width: 450px;
    Which browser version are you using ? Recently I play around with CSS a lot and it seems for some CSS properties they are from CSS-3 for which my IE 7 does not support some of theml. FF 3.6 no problem.

    The work-around would be using JavaScript but then this is tedious, therefore I opt for jQuery and jQuery UI for all my needs. In particular IE 6 ruin a lot of CSS properties but jQuery somehow has the fix and work-around.

  3. #3
    Join Date
    Mar 2005
    Location
    Craiova
    Posts
    154
    @sohguanh: min-width is CSS2, but still not supported by IE7, the workaround is to set both min-width and width for IE7, then it works as expected.

    However, going back on topic, min-width sets the min-width for #main, and has no effect on background.
    Also, background-position is incomplete. You need "top left", "top center", "top right" or something along the lines of that in order for anything to work (not only "top"!).

    And I don't understand what you need. Can you explain again?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles