Random background-image with PHP

I would like to have random images as background-images on a
page. So I
made a rotate.php ("SELECT picsid, picsurl FROM pics WHERE
picsite =
'home' ORDER BY MD5(RAND()) limit 1") with
<img src="<?php echo $row_rsimages['picsurl']; ?>"
alt="" />
Then I put the following rule into the css-file:
#pics {
width: 400px;
height: 200px;
background-color: #fff;
background-image: url(banner.php);
background-repeat: no-repeat;
background-position: top left;
Finally I inserted a div called #pics on the index.php and
previewed the
page, and - you are right ;) - the images are not displayed.
Where have I failed?
Martin Lang

Martin Lang wrote:
> I would like to have random images as background-images
on a page. So I
> made a rotate.php
> background-image: url(banner.php);
> Where have I failed?
In several places.
1. Presumably banner.php is the page that you earlier refer
to as
rotate.php. The name should be the same.
2. It looks as though you're trying to use an <img> tag
to display a
background image. That won't work.
3. If you want banner.php to display an image, you need to
send the
correct MIME header and stream the image as a download.
// code to select the image
$filepath = '/home/mysite/htdocs/images/'; // path to image
folder
$image = $filepath.$row_rsimages['picsurl'];
if (file_exists($image) && is_readable($image)) {
$size = filesize($image);
header('Content-type: image/jpeg');
header('Content-length: '.$size);
$file = @fopen($image, 'rb');
if ($file) {
fpassthru($file);
It's actually a lot simpler to do everything in the same
page.
Put the recordset at the top of the page to select the random
image.
Then put the style block in the head of the document:
<style type="text/css">
#pics {
width: 400px;
height: 200px;
background-color: #fff;
background-image: url(<?php echo $row_rsimages['picsurl'];
?>);
background-repeat: no-repeat;
background-position: top left;
</style>
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Similar Messages

  • Inserting Random Background Images

    Hi
    Can someone please please help me. I have a very simple Flash
    movie where I
    want to insert a random background image every time the movie
    plays or the
    web page is refreshed.
    I found the following script online but need a step by step
    idiot¹s guide
    how to add it to the original Flash file.
    randomClips = new Array ("background0.jpg",
    "background1.jpg",
    "background2.jpg", "background3.jpg");
    function randomBackground() {
    randomNumber = random (randomClips.length);
    _root.mtClip.loadMovie (randomClips[randomNumber]);
    randomBackground();
    Cheers
    Sally

    > This message is in MIME format. Since your mail reader
    does not understand
    this format, some or all of this message may not be legible.
    --B_3299484431_177155
    Content-type: text/plain;
    charset="ISO-8859-1"
    Content-transfer-encoding: 8bit
    Hi
    Many many thanks. This is practically the same as Rob from
    Action Script
    Group suggested. You are both geniuses!!! I didn¹t
    though alter the size
    of the stage as I have an existing movie.
    Thanks again,
    Take care
    With kind regards
    Sally
    --B_3299484431_177155
    Content-type: text/html;
    charset="ISO-8859-1"
    Content-transfer-encoding: quoted-printable
    <HTML>
    <HEAD>
    <TITLE>Re: Inserting Random Background
    Images</TITLE>
    </HEAD>
    <BODY>
    <FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN
    STYLE=3D'font-size:12.0px'>Hi<BR=
    >
    <BR>
    Many many thanks.  This is practically the same as
    Rob from Action Scr=
    ipt Group suggested.   You are
     both geniuses!!!  I didn=
    &#8217;t though alter the size of the stage as I have an
    existing movie. &nb=
    sp;<BR>
    <BR>
    Thanks again,<BR>
    <BR>
    Take care<BR>
    <BR>
    With kind regards<BR>
    <BR>
    Sally<BR>
    </SPAN></FONT>
    </BODY>
    </HTML>
    --B_3299484431_177155--

  • [ANSWERED]Which terminals let you set a random background image?

    Many terminals nowadays let you set a background image on the terminal itself.
    Which terminals let you set a random background image from a directory or list of images? Also need to be able to have multiple terminals with different background images open, so having a script that moves around images won't work.
    I like this because when you have lots of terminals open, you can associate each with their background image. Also if your background image isn't a tiled thing or a stylized gradient (such as a human, etc), it might look bad when duplicated all over the screen.
    I could use transparency, but I don't like psuedo transparency, and real transparency comes with all sorts of problems. (For me at least.) I would still prefer having multiple background images though.
    Konsole and eterm are the only two I know that can do this, but konsole is KDE, and eterm has no unicode support, is dead (I think), and is ugly.
    Last edited by sokuban (2008-12-31 21:20:12)

    So now that time has passed and I'm on a clean new install, I decided to try out uxvrt again. The good news in that now I can type in it with scim. I have no clue how or why, but it means the greatest hurdle is gone.
    I also even managed to get a good looking English font.
    urxvt*font: xft:Monospace:pixelsize=12
    Only problem is a readable east asian font. The default font is a mess and everything is squished together. If I explicitly select an east asian font, then there are huge spaces between each letter, even for english. So I find out this is a known bug, and I find a patched aur package for it, but the patch doesn't seem to make a difference.
    I know urxvt lets you select a main font and a secondary font and so on. Maybe I did the syntax wrong. I tried both:
    urxvt*font: xft:Monospace:pixelsize=16
    urxvt*font: xft:WenQuanYi Zen Hei:size=9:antialias=True
    and
    urxvt*font: xft:Monospace:pixelsize=16,urxvt*font: xft:WenQuanYi Zen Hei:size=9:antialias=True
    Neither of them worked. From what my understanding of what the man page says, the size of the cell is supposed to be based on the main font, but in both those cases the secondary font stretches the cells.
    Can anybody reccomend fonts for east asian scripts that work well and show me your .Xdefaults ?
    FAKE EDIT: I just thought of an idea, and it kinda works:
    urxvt*font: xft:Monospace:pixelsize=16,xft:WenQuanYi Zen Hei:size=9:antialias=True
    Now I get a readable font, but massive spacing issues between Chinese Characters.
    EDIT: About the pixmaps, I got a script to randomly select and image and all is fine, but I can't seem to find a way to disable scaling. I can set the size of the picture by a percent, but it doesn't let me use decimals and it is impossible to get the exact resolution of the picture to display. (Unless I let it tile, but the pictures I am using aren't meant to be tiled.) Is there a way to either disable scaling, or set the urxvt size in pixels so I could make it exactly 640x480. The urxvt man page says that a scale of 1 disables scaling, but it seems to have no effect.
    EDIT2: I just noticed I can't use scim now. I have no clue why, but I think compiling it with afterimage support breaks it.
    EDIT3: I found out why scim was not working/working. I had to add this to my ~/.scim/global:
    /SupportedUnicodeLocales = en_CA.UTF-8
    I also got a script that works, kinda:
    #!/bin/bash
    image="$(ls /usr/local/share/cgs | sort -R | tail -1)"
    urxvt -pixmap /usr/local/share/cgs/$image\;86x100
    The only problem is that I don't know how to get urxvt -pixmap to keep the aspect ratio of the image. 86x100 is the closest it will let me get to the actual aspect ratio, but it is off slightly. Barely noticable. The man page says that propscale will do this, but it doesn't seem to work.
    Either way, for now, I am just going to use 86x100.
    Last edited by sokuban (2009-03-22 02:01:45)

  • Problem uploading images with php script.

    As a webdebdesigner i developped a cms system to upload images with php to a mysql database. Firefox version 5.0.1 for MAC and earlier have no problems with uploading through the script. But after that version it is impossible to upload images bigger then 250kb. The page where the customer chooses his image for upload stalls and the form is not sent to the actual upload script, which should validate and process the image.
    This problem only occurs in Firefox, all other browsers work just fine!
    On top of that: Giving feedback to firefox not possible for MAC.

    Try posting at the Web Development / Standards Evangelism forum at MozillaZine. The helpers over there are more knowledgeable about web site development issues with Firefox. <br />
    http://forums.mozillazine.org/viewforum.php?f=25 <br />
    You'll need to register and login to be able to post in that forum.

  • Trying to matte a background image with a PNG with transparency / partial transparency

    Hello everyone.
    Here is the scenario;
    I have a PNG sequence rendered from a 3d program. The sequence includes a landscape that is partially transparent and has no background image or color. In the animation, anything that is not the landscape is 100% transparent, while the landscape is partially transparent.
    I have a background that I want to put behind the PNG sequence but I don't want the background to be visible through the landscape portion of the sequence, only the portion that is 100% transparent.
    I have tried several different methods, but because the landscape is partially transparent, using a track matte (alpha or alpha inverted) or blend mode (like stencil alpha) does not give me the results I am looking for.
    What I am looking for is a way to matte (or mask) the background image with only the portion of the PNG that is 100% transparent. That way, the background image will not show through the semi-transparent landscape, but will be visible in the portion that is 100% transparent.
    I would like to find a reasonable solution in After Effects as opposed to re-rendering the 3d sequence with the objects being unseen by the camera and the background present. The landscape scene itself took a considerable amount of time to render (120+ hours) and I would like to avoid that kind of delay in my project.
    I thank you all in advance for your consideration.

    The footage itself is fine, Dave. The 3d application is rendering exactly what it is supposed to render; a semi-transparent landscape on a transparent background, rendered out to 32 bit PNGs.
    When I view the frames in Photoshop, they are exactly what I wanted. In the final composition, there are other image elements and pre-rendered objects provided by the client that need to be visible beneath the "ground" and "water", which is why I rendered the landscape as semi-transparent. Normally, I would render with a color background for compositing, but using a color background in this case was tinting the semi-transparent landscape.
    I think my track mattes are failing because the images are made up of varying degrees of alpha.
    Going back to the 3d application, the only option there would be to re-render a pure alpha pass of the animation. I can test the render time per frame, but I was hoping that there would be an easier solution... the initial landscape animation took 70+ hours to render, using 32 cores and 24 gb of RAM. The pure alpha render shouldn't take anywhere near that long, BUT, if it did, that would not be feasible on my current schedule.
    I did find another possible solution by creating a recorded script to batch convert luma images from the PNGs. If the alpha pass proves unworkable, I can always fall back to batching the luma images and using stencil luma.
    Thanks for helping me further think this out!

  • Adding a background image in php

    Hey guys, i have a php file on which i need to add a background image to better coordinate my website and i can´t remember the code and where it goes. Could someone help ?
    thanks guys.

    I think the two links from w3schools should show you.  Or go to any straightforward web page and use your browser to view source and take a look at someone elses page.  Or get to grips with a Firefox plug-in called Firebug.  Or just read any basic CSS tutorial.
    If you can post a link to your page it will be easy for someone here to show you but in my opinion, this is one you ought to work out for yourself.  A consistant piece of advice regularly given here by the experts is to learn HTML and CSS if you want to get to grips with DW.
    Having said that, DW will hold your hand a little if you use it's tools for writing CSS.  http://www.adobe.com/devnet/dreamweaver/css.html
    martin

  • Background images with spry "horizontal menu"

    hi again
    I am trying to work with the spry: "horizontal menu"
    I want to put some background images into the menu bar not into the submenu
    and that is the problem: the background images appears overall
    what can I do ?
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Unbenanntes Dokument</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    <!--
    #container {
         margin-right: auto;
         margin-left: auto;
         width: 400px;
    -->
    </style>
    </head>
    <body>
    <div id="container">Raum für den Inhalt von  id "container"
    <ul id="MenuBar1" class="MenuBarHorizontal">
      <li><a href="#">Element 1</a>  </li>
    <li><a class="MenuBarItemSubmenu" href="#">Element 3</a>
        <ul>
          <li><a href="#" class="MenuBarHorizontal">heija</a>      </li>
          <li><a href="#">soso</a></li>
    </ul>
      </li>
      <li><a href="#">Element 4</a></li>
    </ul>
    <p>  </p>
    <p> </p>
    <p> </p>
    <p> </p>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>
    and css
    ul.MenuBarHorizontal
         margin: 0;
         padding: 0;
         list-style-type: none;
         font-size: 100%;
         cursor: default;
         width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
         z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
         margin: 0;
         padding: 0;
         list-style-type: none;
         font-size: 100%;
         position: relative;
         text-align: center;
         cursor: pointer;
         width: 100px;
         float: left;
         height: 10px;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
         margin: 0;
         padding: 0;
         list-style-type: none;
         font-size: 100%;
         z-index: 1020;
         cursor: default;
         width: 100px;
         position: absolute;
         left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
         left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
         width: 100px;
         height: 30px;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
         position: absolute;
         margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
         left: auto;
         top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
         border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
         display: block;
         cursor: pointer;
         background-color: #FEF3E4;
         padding: 0.5em 0.75em;
         color: #FFF;
         text-decoration: none;
         background-repeat: no-repeat;
         background-image: url(../rot.jpg);
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
         color: #FF0;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
         background-color: #FEF3E4;
         color: #FF0;
         background-image: url(../rot.jpg);
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
         background-color: #FEF3E4;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
         background-color: #0F9;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
         background-color: #FEF3E4;
         color: #FF0;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
         background-color: #F99;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
         position: absolute;
         z-index: 1010;
         filter:alpha(opacity:0.1);
    /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */
    @media screen, projection
         ul.MenuBarHorizontal li.MenuBarItemIE
              display: inline;
              f\loat: left;
              background: #FFF;

    Complete page and css code below (scroll down)
    All you should be concerned with at this moment to get the background image to appear in the top level anchor is the css style below:
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-color: #000;
    background-image: url(../rot.jpg);
    background-repeat: no-repeat;
    background-position: left top;
    I've added the background-postion because presumably you want it to appear flush left. This overides the out-of-the-box setting which positions it 95% far left.
    Here is the code and css:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Untitled Document</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Unbenanntes Dokument</title>
    <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
    <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" />
    <head>
    <style type="text/css">
    <!--
    #container {
         margin-right: auto;
         margin-left: auto;
         width: 400px;
    -->
    </style>
    <style>
    ul.MenuBarHorizontal
         margin: 0;
         padding: 0;
         list-style-type: none;
         font-size: 100%;
         cursor: default;
         width: auto;
    /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html */
    ul.MenuBarActive
         z-index: 1000;
    /* Menu item containers, position children relative to this container and are a fixed width */
    ul.MenuBarHorizontal li
         margin: 0;
         padding: 0;
         list-style-type: none;
         font-size: 100%;
         position: relative;
         text-align: center;
         cursor: pointer;
         width: 100px;
         float: left;
         height: 10px;
    /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */
    ul.MenuBarHorizontal ul
         margin: 0;
         padding: 0;
         list-style-type: none;
         font-size: 100%;
         z-index: 1020;
         cursor: default;
         width: 100px;
         position: absolute;
         left: -1000em;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible
         left: auto;
    /* Menu item containers are same fixed width as parent */
    ul.MenuBarHorizontal ul li
         width: 100px;
         height: 30px;
    /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */
    ul.MenuBarHorizontal ul ul
         position: absolute;
         margin: -5% 0 0 95%;
    /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */
    ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible
         left: auto;
         top: 0;
    DESIGN INFORMATION: describes color scheme, borders, fonts
    /* Submenu containers have borders on all sides */
    ul.MenuBarHorizontal ul
         border: 1px solid #CCC;
    /* Menu items are a light gray block with padding and no text decoration */
    ul.MenuBarHorizontal a
         display: block;
         cursor: pointer;
         background-color: #FEF3E4;
         padding: 0.5em 0.75em;
         color: #FFF;
         text-decoration: none;
         background-repeat: no-repeat;
         background-image: url(../rot.jpg);
    /* Menu items that have mouse over or focus have a blue background and white text */
    ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus
         color: #FF0;
    /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */
    ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible
         background-color: #FEF3E4;
         color: #FF0;
         background-image: url(../rot.jpg);
    SUBMENU INDICATION: styles if there is a submenu under a given menu item
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenu
    background-color: #000;
    background-image: url(../rot.jpg);
    background-repeat: no-repeat;
    background-position: left top;
    /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenu
         background-color: #0F9;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal a.MenuBarItemSubmenuHover
         background-color: #FEF3E4;
         color: #FF0;
    /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */
    ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover
         background-color: #F99;
    BROWSER HACKS: the hacks below should not be changed unless you are an expert
    /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */
    ul.MenuBarHorizontal iframe
         position: absolute;
         z-index: 1010;
         filter:alpha(opacity:0.1);
    </style>
    </head>
    <body>
    <div id="container">Raum für den Inhalt von  id "container"
    <ul id="MenuBar1" class="MenuBarHorizontal">
    <li><a class="MenuBarItemSubmenu" href="#">Element 1</a>  </li>
    <li><a class="MenuBarItemSubmenu" href="#">Element 3</a>
        <ul>
          <li><a href="#" class="MenuBarHorizontal">heija</a>      </li>
          <li><a href="#">soso</a></li>
    </ul>
      </li>
      <li><a href="#">Element 4</a></li>
    </ul>
    <p>  </p>
    <p> </p>
    <p> </p>
    <p> </p>
    </div>
    <script type="text/javascript">
    <!--
    var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
    //-->
    </script>
    </body>
    </html>

  • Adding a background image with HTML?

    Just a quick one. Want to add a background image to the html
    of a flash site so the background image can scale and the content
    of the flash site not scale. Any ideas anyone??
    Thanks all!

    satrop wrote:
    > Just a quick one. Want to add a background image to the
    html of a flash site so the background image can scale and the
    content of the flash site not scale. Any ideas anyone??
    You can place the image in flash. Flash has onResize handler
    which in conjunction with
    listener, can detect the changes in stage, scale movie to
    fill the window while preventing
    other content from scaling. This is very common, when we
    resize background to fill window
    but hold the content intact. Try to search the forum for
    "onResize". That's the only case,
    in most posts, where we deal with the exact same issue as the
    one you looking for.
    Best Regards
    Urami
    "Eat one live toad in the morning and nothing worse will
    happen to you for the rest of the day."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Dynamically swap background image with mouseover

    Hello, I need some help with this menu file. My inspiration was a post of Resdesign.
    I want to make a rollover that swap the background image for each button.
    I tried a lot of methods but I cant find the solution (please check line 111).
    Here is my file:
    WeTransfer
    Thanks a lot!
    alex from argentina

    Thanks Preran for your answer but I can´t find the way to implement the solution in that post.
    I tried this:
    // mouseover swap background
    sym.$('#newBtn'+i).mouseover(function(){
      sym.$("#newBtn"+i).css({'background-image':'url("images/fover.jpg")'});
      //sym.getSymbol("#newBtn"+i).$('background').attr('src',info[i].backo);
    Thanks!

  • Macbook pro crashes and goes to the background image with no access to dock etc..

    Macbook Pro Early 2011 version, running Lion OSX, crashes randomly and goes to the background image. the dock is not accesible nor are any other options, I have to hold down power to restart. I have found that a lot of my applications have started to crash especially iphoto, itunes and safari. Ive repaired permissions deleted anti virus software which i thought was slowing the computer down. Any help would be appreciated..

    I suggest you post this issue on the iTunes forum.  You will have an audience that is oriented specifically towards this application.
    Ciao.

  • Responsive Background Images with Media Queries

    Hello,
    I'm creating a mobile website in Dreamweaver and would like to use an image which will change with different device widths.  I'm using media queries with background images.  My problem is that in order for the background images to display, I need to assign a height to the div.  When the image is scaled down the height stays static, leaving white space beneath it.  There will be content below the image so the white space will push it down and look wrong.  Is there a way to use multiple images with media queries keeping the height responsive?  Thank you!
    @media screen and (max-width: 1024px) {
    #mainImage {
              background-image: url(../images/mainImageLarge.jpg);
              background-repeat: no-repeat;
              background-position: center top;
              background-size: 100%;
              height: 272px;
              border-top-width: 3px;
              border-top-style: solid;
              border-top-color: #FFF;
    @media only screen and (max-width : 480px) {
    #mainImage {
              background-image: url(../images/mainImageMed.jpg);
              background-repeat: no-repeat;
              background-position: center top;
              background-size: 100%;
              height: 107px;
              border-top-width: 3px;
              border-top-style: solid;
              border-top-color: #FFF;
    @media only screen and (max-width : 320px) {
              #mainImage img {
              background-image: url(../images/mainImageSmall.jpg);
              background-repeat: no-repeat;
              background-position: center top;
              background-size: 100%;
              height: 150px;
              border-top-width: 3px;
              border-top-style: solid;
              border-top-color: #FFF;

    Like this example:
    http://alt-web.com/FluidGrid/Fluid-4.html
    METHOD:
    Insert 2 images -- one for desktops and one for mobile.  Assign classes to each image. 
    <img id="banner" class="desktop" src="desktop_image.jgp" />
    <img id="banner" class="mobile" src="mobile_image.jpg"/>
    In your CSS, use display:none and display:block to show/hide.
    .desktop {
        display:block;
    .mobile {
        display:none;
    /* Special Rules for mobiles */
    @media only screen and (max-width: 480px) {
        .desktop {display:none}
        .mobile {display:block}
    Feel free to set your break points however you wish.
    Nancy O.

  • Background image with Crystal Report 2008

    Hi,
       I have to develop an invoice report with a background image on the full page.
    I have already develop some trying but i have not the right result:
    1) Background image in page header
    2) Create 2 different sections: one for the image and one with labels and data
    3) Background image in report header
    4) Background image in report footer
    In all of my tests  in Report > Section Expert, I check Underlay Following Sections on the Common tab
    but never the image was printed in background respect of the different sctions.
    I always got the image and then the rest of the report
    Can you help me please?
    Thank you for your attention
    Bye
    Edited by: EDPTEAM on Aug 30, 2011 5:52 PM

    Hello Brian.
    Thanks for you answer.
    I do just like you say but i have the same problem.
    My report is like an invoice: i have an header, a body with a group and 2 sections and a footer.
    All the pages of my report must be printed on a background image (A4 format).
    This is the problem.
    If i create a report with image in a single section all is ok. But in my report if i use a small image, the image is printed and hide columns separator (simple vertical lines) and show data but the following sections lose their right position.
    If I use the original image (A4 format) CR return the following error:
    header or footer too large for the page
    o similar word (I translate from italian to english because I am working with italian version).
    Do you have other solutions?
    Thank you wery much.
    Best regards

  • Why do I not see the background image with html5 boilerplate

    hello,
    I downloaded the html5 boilerplate
    And in the main.css I made this :
    body {
        font: 16px/26px Helvetica, Helvetica Neue, Arial;
        background-image: url(../img/background.jpg)
    and also in the normalize.css I set this :
    body {
        margin: 0;
        background-image: url(../img/background.jpg)
    But in IE10 I still do not see the background image.
    Can anyone tell me what I did wrong ?
    Roelof

    Hello
    You need to run your VI once. Wire the Select Signals express VI to your DAQ Assistant and run the VI once (this allows the signal names to propegate).
    Check this forum:
    select signals
    Regards

  • Set my background image with right click?

    Is there a way to set a picture as my desktop background without looking through tiny pictures in system prefs? I just want the right click feature. The only way this works is if you right click a picture ONLINE, but this doesnt work in my pictures folder...

    You can always drag a picture from your folder into Safari, then right click and select "Use Image as Desktop Picture"--might hit a snag though with some things in portrait orientation, they can display in landscape.
    Another option is make an Automator action, save it as a plug-in for Finder. You then right click, go to More, Automator, and select your action and get the new Desktop.
    Francine
    Francine
    Schwieder

  • Printing .GIF images with PHP

    Hello,
    As part of a PHP IF statement, I would like to print an image
    instead of text. How do I do this?
    Thanks in advance,
    John

    I've done some dabbling in PHP's GD library (the image
    manipulation extension of PHP).
    What I have done in the past is create a separate php file
    just for the image output. I then pass in the parameters needed to
    create the image in the image request. So as an example, I'd send
    the image request like so:
    http://domain.com/preview_image.php?text_string=Type%20Text%20Here&text_color=black&bg_col or=white&font=ADORABLE
    preview_image.php is the php file that contains the script to
    generate the image based off of the text_string, text_color, and
    bg_color variables contained in the query parameters.
    Or if you don't need a dynamic image, just echo the image tag
    inside the if statement:
    echo "<img src='pathtoimage.jpg'>;

Maybe you are looking for