CSS background images and other images disappear after FORM submit

Discussion in 'HTML & Website Design' started by mobilej, Mar 3, 2012.

  1. #1
    Hi there.

    I have a problems with form. After I press submit button, all images on page just disappear (I see only what is in ALT tag). This happens in all browsers.

    HTML:

    <div id="stylized" class="myform">
    		<form method="post" action="<?php echo $path; ?>">
    			<label>Korisničko Ime:</label>
                <input name="uname" type="text" value="" />
                <label>Lozinka:</label>
                <input name="password" type="password" value="" />
                <button type="submit" name="submit" value="Prijavi se" />
                <input type="hidden" name = "aa" value = "1" />
                <button type="reset" value="Poništi" />
            </form>
        	<div style="clear:both"></div>
        </div>
    HTML:
    CSS:
    #stylized{
    border:solid 2px #CCCCCC;
    background:#EEEEEE;
    }
    #stylized h1 {
    font-size:14px;
    font-weight:bold;
    margin-bottom:8px;
    }
    #stylized p{
    font-size:11px;
    color:#666666;
    margin-bottom:20px;
    border-bottom:solid 1px #b7ddf2;
    padding-bottom:10px;
    }
    #stylized label{
    display:block;
    font-weight:bold;
    text-align:right;
    width:140px;
    float:left;
    }
    #stylized .small{
    color:#666666;
    display:block;
    font-size:11px;
    font-weight:normal;
    text-align:right;
    width:140px;
    }
    #stylized input{
    float:left;
    font-size:12px;
    padding:4px 2px;
    border:solid 1px #aacfe4;
    width:200px;
    margin:2px 0 20px 10px;
    }
    #stylized button{
    clear:both;
    margin:0;
    padding:0;
    
    width:125px;
    height:31px;
    background:#eeeeee url(../images/button.png) no-repeat;
    text-align:center;
    line-height:31px;
    color:#FFFFFF;
    font-size:11px;
    font-weight:bold;
    border:0;
    float:left;
    
    }
    
    #stylized button:hover{
    	background:#eeeeee url(../images/button-hover.png) no-repeat;
    }
    
    .spacer{clear:both; height:1px;}
    
    .myform{
    margin:0 auto;
    width:400px;
    padding:14px;
    padding-left:200px;
    padding-right:200px;
    }
    HTML:

    Hmm, I see that it works (show images) if I put action="". Why it does not work if I put action="<?php echo $path;?>"? path file exists.

    Thank you
     
    mobilej, Mar 3, 2012 IP
  2. mobilej

    mobilej Well-Known Member

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    126
    #2
    Fixed. I used relative instead of absolute path to images. Topic may be closed. Thank you
     
    mobilej, Mar 3, 2012 IP