Having issues adding a background image to div

Discussion in 'Web Design and Development' started by kitki83, Jul 31, 2008.

  1. kitki83 macrumors 6502a

    Joined:
    Mar 31, 2004
    Location:
    Los Angeles
    #1
    I am having trouble adding background image to the home page. I want to leave everything white and have the center portion have the background so I cant add bg-image to <body> so i created a temp Div style tag to add it but did not work. I tried uploading but I think my site croaked so I am adding the code for reference the site is www.rmndesigns.net.

    Thank you

    ps my bg is in bold

    Code:
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
     <meta name="description" content="Experienced in print, web, and marketing.I've been working in this field for about four years. I believe a well-rounded professional is a must to be in today's multifaceted job market that demands a high level of expertise and diversity." ></meta>
        <meta name="keywords" content="Print, web, design, graphics, marketing, information system, freelancer, creative"></meta>
        <meta name="copyright" content="Copyright Rene Martin Designs 2008" />
        <meta name="author" content="Rene Martin Navarro" ></meta>
        <meta name="email" content="kitki83@hotmail.com" ></meta>
        <meta name="Rating" content="General" ></meta>
        <meta name="Robots" content="INDEX,NOFOLLOW" ></meta>
        <meta name="verify-v1" content="lOFQhPLc06qT0TfkCDzT0XNGaS36nW7sqaf+DrSOk5s="></meta>
    <title>Rene Martin Navarro Graphic Designer</title>
    <link href="styles/styles.css" rel="stylesheet" type="text/css" />
    <!--[if IE 5]>
    <link rel="stylesheet" type="text/css" href="ie5styles.css" />
    <![endif]-->
    <!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="ie7styles.css" />
    <![endif]-->
    <!-- *********LIGHTBOX********************* -->
    <script type="text/javascript" src="js/prototype.js"></script>
    <script type="text/javascript" src="js/scriptaculous.js?load=effects,builder"></script>
    <script type="text/javascript" src="js/lightboxcontact.js"></script>
    
    <link rel="stylesheet" href="styles/lightbox.css" type="text/css" media="screen" />
    
    <!-- ********* END OF LIGHTBOX************* -->
    
    </head>
    
    <body>
    [B]<div  style="background-image:url(images/bg.jpg) repeat; background-repeat:repeat;">
    <div id="container">[/B]
    
    <div id="header">
    <a href="index.htm" ><img src="images/logo.gif" alt="RMN Designs" width="167" height="66" style="margin-left: 18em; margin-top:4em;" /></a>	
    		<ul id="nav">
    			<li id="navAbout"><a href="./index.htm">Home</a></li>
    		  <li id="navResume"><a href="resume/index.htm">Resume</a></li>
    		  <li id="navPortfolio"><a href="portfolio/index.htm">Portfolio</a></li>
    		  <li id="navContact"><a href="contact/index.htm">Contact</a></li>
    	</ul>
        
    </div>
    
    
    
    <div id="contentPortfolio"> <!-- Top Image not aligning by few pixels test on all browsers -->
    <!-- ALWAYS KEEP TOP -->
    <img src="images/portfolio_content_topimg.jpg" alt="Top BG Content" width="551" height="40" style="vertical-align:top;" />
    <!-- ********************************************************************************************* -->
    <p><img src="images/home_divisiontabs.gif" alt="Who am I?" width="335" height="22" />
    <br /><br />
        	Hello!  My Name is Rene Martin, or Martini, as some of my colleagues call me.  I am a Print and Web Designer based out at Los Angeles, CA, and I've been working in this field for about four years since graduating from <a href="http://www.lmu.edu">Loyola Marymount University</a>.  Currently, I attend <a href="http://www.smc.edu">Santa Monica College</a> as means to continue my professional development, as well as polish my skills in web programming.<br /><br />
    
    I believe a <a href="resume/index.htm">well-rounded professional</a> is a must to be in today's multifaceted job market that demands a high level of expertise and diversity from us professionals.<br /><br />
    
    Aside from my professional background and skills, I am really a mellow person.  I enjoy <a href="portfolio/index.htm">photography</a>, overseeing a grass-roots organization, taking classes, spending time with my family, and getting ready to attend graduate school in the spring of '09 with a Masters in Library and Information Science.<br /><br />
    
    I feel extremely blessed to be able to spend my days designing and feeling/being creative. To me, a job should feel like eight hours of pure playtime!</p>
        <span style="margin-left:350px;"><img src="images/content_signature.gif" alt="Rene Martin" width="125" height="49" /></span>
         
         
         <div id="disclaimer" class="footer">
        <a href="http://www.myspace.com/renemartini" title="MySpace Account">MySpace</a> | 
        <a href="http://www.facebook.com/profile.php?id=725791092" title="Facebook Account">Facebook</a> | 
        <a href="http://www.flickr.com/photos/renemartini/" title="Flickr Account">Flickr</a> | 
        <a href="http://youtube.com/user/kitki83" title="Youtube Account">Youtube</a> | 
        <a href="http://twitter.com/renemartini" title="Twitter Account">Twitter</a> |
        <a href="http://www.linkedin.com/pub/8/6b4/529" title="Linkedin">Linkedin</a>
    	<br />Copyright  © 2008 Rene Martin Graphic/Web Design.
    	<strong>| 310.489.7351 | <a href="mailto:renemartini@gmail.com">Email</a></strong>
    	</div> 
        
        
    <!-- RESUME LINKS  LIGHTBOX TESTING  
        <p style="margin-left:29.2em;">
        <a href="../files/renemartin_resume.pdf">Resume   (PDF)      </a>
        <a href="../files/renemartin_resume.doc">(DOC)      </a>
        <a href="../images/resume_coverletter.jpg" rel="lightbox[resume]" title="Cover Letter">(IMG)</a>
        <a href="../images/resume_resume.jpg" rel="lightbox[resume]" title="Resume"></a>
      
        <br />
        <a href="../files/renemartin_resumelite.pdf">Resume Lite   (PDF)      </a>
        <a href="../files/renemartin_resumelite.doc">(DOC)      </a>
        <a href="../images/resume_coverletterlite.jpg" rel="lightbox[resumelite]" title="Cover Letter">(IMG)</a>
        <a href="../images/resume_resumlitee.jpg" rel="lightbox[resumelite]" title="Resume"></a>
        <br />
    	
        </p>
        
    -->   
        <!-- ALWAYS KEEP BOTTOM -->
    <img src="images/portfolio_content_bottomimg.jpg" width="551" height="34" style="vertical-align:bottom;" />
    <!-- ********************************************************************************************* -->
    </div>
    
    <div id="rightnav">
    	
        <a href="resume/index.htm" title="Resume. For Pdf or Doc version go to Resume tab."><img src="images/rightnav_resume.png" alt="Rene Martin's Resume" height="200" width="185" /></a>
    <br />
    <br />
        <a href="portfolio/index.htm"><img src="images/rightnav_portfolio.png" alt="Portfolio. For PDF version please click Portfolio tab." height="200" width="185" /></a>
    </div>
    </div>
    
    </div>
    
    
    <!-- ANALYTICS ENGINES GOOGLE and CRAZYEGG -->
    <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
    </script>
    <script type="text/javascript">
    _uacct = "UA-2372605-3";
    urchinTracker();
    </script>
    
    <script type="text/javascript" src="http://cetrk.com/pages/scripts/0008/8238.js"> </script>
    <!-- *************************************************************************************** -->
    
    </body>
    </html>
    
    
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Your background url references images/photo/bg.jpg, but when I type that in directly to the location bar I get a 404 error meaning that image doesn't exist. That would be the problem.
     
  3. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #3
    Indeed.

    There is a 'bg.jpg' located in your /images/ folder, but not your /images/photo/ folder.

    You should probably stop people looking in your directories too :)
     
  4. kitki83 thread starter macrumors 6502a

    Joined:
    Mar 31, 2004
    Location:
    Los Angeles
    #4
    How do I do that?
     
  5. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #5
    Well, the easiest thing to do is to bung an index.html in your folder saying something witty like 'Your not allowed to come here and see a list of all my images you directory snooper :p'

    But seriously... an index.html (or index.php etc...) will catch most people.

    There are more complex ways, but I couldn't tell you without a little search.

    -EDIT- see here
     
  6. kitki83 thread starter macrumors 6502a

    Joined:
    Mar 31, 2004
    Location:
    Los Angeles
    #6
    Ok I have no idea but what I upload shows up on the browser as forbidden

    www.rmndesigns.net/new

    Forbidden
    You don't have permission to access /new/index.htm on this server.

    Apache/1.3.41 Server at rmndesigns.net Port 80

    Now how can I ask people to view it if I can't even make it viewable.
    (This is something new to me happened)
     
  7. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #7
    Well telling them permission denied was the purpose of removing the indexes option. If you want to setup a custom error page check out this link. It's pretty easy since you've already setup the .htaccess file. I have custom 403 and 404 error pages for my site. You can put whatever you want on the page. Generally you'll give them a link back to the homepage or something.
     
  8. design-is macrumors 65816

    design-is

    Joined:
    Oct 17, 2007
    Location:
    London / U.K.
    #8
    Sorry I'm confused... I can still access your files and directories. Have you fixed it?
     
  9. kitki83 thread starter macrumors 6502a

    Joined:
    Mar 31, 2004
    Location:
    Los Angeles
    #9
    Yeah, the link I gave works now but I contact the web host somehow my ftp access is restricted so I need to fix it to full access in order for anything I upload would show. I guess I have to fix the problem before I can ask he question.

    Thank you for letting me know the htm file is showing up now for the rest.



    ps. Ok my website is having a flu. I guess this issue will be postponed for later till its fixed. basically something to do with permissions and when the webhost fixes it and I reupload new content it comes back blocking me from viewing it.
     

Share This Page