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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problems placing text on background image

    Hi,

    I'm having big problems trying to place the text which has fallen off the RHS of the page and the text at the bottom of the page, (apart from the contacts footer text) directly on top of the image.

    The url top my site is: http://www.goodtastecatering.org.uk

    I want it to look like the central part of this page:

    http://www.gordonramsay.com/corporate/trainingschool/

    Here the text has a nice white background and leaves enough of a border to show the background image.

    This is my first website so I would be very grateful if someone could point me in the right direction. If I need to paste any code in please let me know.

    Many thanks!

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello emsky,
    There are quite a few very basic errors in your layout that need fixed.

    First of all, replace that DocType you have with this:
    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" />
    <title>Good Taste Catering</title>
    Then go validate your code. See the links about validation in my sig below.


    That's not going to fix everything but it'll be a good start.
    While your at it, have a look at this link about why you should stay away from using absolute positioning - http://www.tyssendesign.com.au/artic...ning-pitfalls/


    If I need to paste any code in please let me know.
    We can get the code and CSS from the link. A link is always MUCH better than posting code.



    ...
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Jan 2009
    Posts
    316
    Thanks
    7
    Thanked 92 Times in 91 Posts
    Apply the image to your background instead of placing it in the page.

    Here's your code re-written a bit to fix the errors of your navigation and other stuff.
    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>
    <title>Good Taste Catering</title>
    <style type="text/css">
    /*********************/
    /* BASIC */
    /*********************/
    body {
    	color: #666666;
    	font-size: 11.5px;
    	font-family: Arial, Verdana, Helvetica, sans-serif;
    }
    #wrapper {
    	width: 760px;
    	margin: 0 auto;
    }
    /*********************/
    /* BANNER AND NAV*/
    /*********************/
    #banner {
    	float: right;
    	background-color: #5A204A;
    	height: 120px;
    	WIDTH: 650px;
    	text-align: left;
    	font-size: 11.5px;
    }
    #nav {
    	margin-top:90px;
    	padding: 0;
    	float:left;
    }
    #nav ul {
    	float:left;
    	margin: 0;
    }
    #nav li {
    	float: left;
    	list-style:none;
    }
    #nav li a {
    	text-decoration:none;
    	color: #FFFFFF;
    	padding-right:20px;
    }
    #nav li a:hover {
    	color: #B4B4B4;
    }
    /*********************/
    /* CONTENT AND SURROUNDING IMAGE*/
    /*********************/
    #middle {
    	clear:both;
    }
    #content {
    	background:url(images/getty79339654_lores.jpg);
    	background: #006699;
    	width:650px;
    	height:100%;
    	float:left;
    }
    #words {
    	float:left;
    	margin:20px;
    	background: #fff;
    	border:1px #666666;
    	display:inline;
    }
    /*********************/
    /* sidebar */
    /*********************/
    #sidebar {
    	float: left;
    	width: 100px;
    	height:100%;
    	text-align: right;
    	padding-right: 10px;
    }
    #sidebar ul {
    	list-style-type: none;
    	margin-top: 0px;
    	margin-left: 0px;
    	padding: 0;
    }
    #sidebar li {
    	width:100px;
    }
    #sidebar a {
    	text-decoration: none;
    	display: block;
    	padding: 10px 5px;
    	color: #666666;
    	text-transform: uppercase;
    }
    #sidebar a:hover {
    	text-decoration: none;
    	color: #5A204A;
    }
    /*********************/
    /* CONTACT */
    /*********************/
    #contact {
    	text-align: left;
    	clear: both;
    	margin-left: 110px;
    	text-decoration: none;
    }
    </style>
    </head>
    <body>
    <div id="wrapper">
      <div id="banner">
        <div id="nav">
          <ul>
            <li><a href="home.html">ABOUT US</a></li>
            <li><a href="home.html">SERVICES</a></li>
            <li><a href="home.html">MENUS</a></li>
            <li><a href="home.html">LINKS</a></li>
            <li><a href="home.html">PHOTO GALLERY</a></li>
            <li><a href="home.html">TESTEMONIALS</a></li>
            <li><a href="home.html">ENQUIRIES</a></li>
          </ul>
        </div>
      </div>
      <div id="middle">
        <div id="sidebar">
          <ul id="sidebar">
            <li><a href="home.html">WEDDINGS</a></li>
            <li><a href="home.html">SPIT ROAST</a></li>
            <li><a href="home.html">FUNERAL TEAS</a></li>
            <li><a href="home.html">FINGER BUFFET</a></li>
            <li><a href="home.html">BARBEQUES</a></li>
          </ul>
        </div>
        <div id="content">
          <div id="words">
            <p>Good Taste Catering is a family business established in 1970, based in West Sussex. It is led by the husband and wife team of David and Nicky Noakes.</p>
            <p>We have developed a reputation for professional, friendly and personal service and for providing some of the very best outside catering services available.</p>
            <p>The food that we prepare is homemade and plentiful, using the finest, local ingredients, and the prices are very competitive. Our aim is to create the perfect menu for you and your guests, tailored to your tastes and specifications. We are happy to visit you to discuss the menus and prices, and to let you sample some of the dishes.</p>
            <p>Good Taste Catering is a recommended catering company at many venues. These include Bartholomew Barn, Fitzleroi Barn, The Weald and Downland Museum, Church Farm at Coombes, Field Place in Worthing, Burptham Hall and Clapham and Patching Hall. We have catered at Claydon House Buckinghampshire, Hampton Court Palace, and Arundel Town Hall. </p>
            <p>We cater for all types of functions, weddings, large and small parties, business lunches and funeral teas. </p>
          </div>
        </div>
      </div>
      <div id="contact">
        <p>To contact Good Taste Catering please call 01903 722976 or email: <a href="mailto:nicky@goodtastecatering.org.uk">nicky@goodtastecatering</a></p>
      </div>
    </div>
    </body>
    </html>

  • #4
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    The free Google program "Picasa" will let you add text to/on your pictures.

    Frank
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.


  •  

    Posting Permissions

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