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 Coder
    Join Date
    Feb 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML and CSS PLEASE HELP

    Hey i am trouble with the following:

    I have an image with an alt but the alt text doesnt seem to be appearing when i float over them. Its very important i get the text to appear time is not on my side. heres my html and css code.


    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    
    <html>
    
    
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Premier Windows and Doors. SERVICES</title>
    <link rel="stylesheet" type="text/css" href="style.css" media="screen" />
    </head>
    
    
    <body>
    <script type="text/javascript" src="wz_dragdrop.js"></script> 
    
    <div id="header">
    <div id="logo">
    	
    
    <h1>Premier Windows and Doors</h1>
    <h3> Carrigtwohill, Co.Cork </h3>
    </div>
    	<!-- end #logo -->
    	
    <div id="menu">
    	
    <ul>
    			<li><a href="http://localhost/index2.html">Home</a>
    </li>
    			<li><a href="http://localhost/aboutus.html">About Us</a></li>
    			<li><a href="http://localhost/order/shopcartindex.html">Products</a></li>
    			<li class="active"><a href="http://localhost/service.html">Services</a></li>
    			<li><a href="http://localhost/contact.html">Contact Us</a></li>
    		</ul>
    	</div>
    	<!-- end #menu -->
    </div>
    <!-- end #header -->
    
    
    	<h4> Drag the images across to create your own garden </h4>
    	<div id="boxdrag">
     <table border="4">	
     
       <TR>
          <TH COLSPAN="6">
            
    		
    
          </TH>
       </TR>
       
      <!-- Images that are being used in construct a back garden theme. they are being stored in a folder called construction --> 
     <tr>
     <td><img name="table2" src="construction/table2.jpg" alt="SEATING" width="100" height= "100"></td>
     <td><img name="barbeque1-snag" src="construction/barbeque1-snag.jpg" alt="BARBEQUE" width="100" height= "100"></td>
     <td><img name="fence" src="construction/fence.jpg" alt="FENSE" width="100" height= "100"></td>
     </tr>
     <tr>
     
    <td><img name="conservatory-snag" src="construction/conservatory-snag.jpg" alt="CONSERVATORY" width="100" height= "100"></td>
     <td><img name="playhouse-snag" src="construction/playhouse-snag.jpg" alt="PLAYHOUSE" width="100" height= "100"></td>
     <td><img name="gardenshed-snag" src="construction/gardenshed-snag.jpg" alt="GARDEN SHED" width="100" height= "100"></td>
     </tr>
     <tr>
     <td><img name="flower-snag" src="construction/flower-snag.jpg" alt="FLOWERS" width="100" height= "100"></td>
    <td><img name="patio-snag" src="construction/patio-snag.jpg" alt="PATIO HEATER" width="100" height= "100"></td>
     </tr>
     
     
    </table>
    </div>
    
    
    	
    	
    	
    	<div id="box123">
    	</div>
    	
     	
    	<!-- end #content -->
    
    
    <script type="text/javascript">
    <!-- images being dragged -->
    <!--
    
    SET_DHTML("barbeque1-snag", "conservatory-snag", "playhouse-snag", "gardenshed-snag", "table2", "pic1", "flower-snag", "fence", "patio-snag", "anotherLayer", "lastImage");
    
    //-->
    
    </script> 
    
    
    
    </body>
    </html>
    
    
    
    body {
    	
    	margin: 0px;
    	padding: 0px;
    	background: #fcf5f5 url(images/img01.gif) repeat-x left top;
    	font: 13px Arial, Helvetica, sans-serif;
    	color: #660000;
    	
    
    }
    
    h1, h2, h3 {
    	margin-top: 0px;
    	
    
    }
    
    h1 {
    	font-size: 2.0em;
    	
    
    }
    
    h2 {
    	font-size: 1.8em;
    	
    
    }
    
    h3 {
    	font-size: 1.4em;
    	
    
    }
    
    ol, ul {
    	margin-bottom: 1.8em;
    	line-height: 160%;
    	font-size: 0.99em;
    	
    }
    
    a {
    	color: #a32626;
    }
    
    a:hover {
    	text-decoration: none;
    	color: #FF0000;
    }
    
    a img {
    	border: none;
    }
    
    /* Header */
    
    #header {
    	width: 650px;
    	height: 100px;
    	margin: 0px auto;
    	
    
    }
    
    #header a {
    	text-decoration: none;
    	color: #FFFFFF;
    }
    
    /* Logo */
    
    #logo {
    	float: left;
    	
    }
    
    #logo h1, #logo h3 , #logo p {
    	margin: 0px;
    	margin-left: -220px;
    	line-height: normal;
    	font-weight: medium;
    	color: #FFFFFF;
    	font: 40px Century Gothic, Helvetica, sans-serif;
    }
    
    #logo h1 {
    	padding: 25px 0px 0px 0px;
    }
    #logo h3{
        margin-left: -20px;
    	font: 14px Century Gothic, Helvetica, sans-serif;
    }
    
    
    
    
    
    /* Menu */
    
    #menu {
    	float: right;
    	margin-right: -220px;
    	
    	
    }
    
    #menu ul {
    	margin: 0px;
    	padding: 49px 20px 50px 0px;
    	list-style: none;
    	line-height: normal;
    	margin-left: -130px;
    	
    	
    	
    }
    
    #menu li {
    	float: left;
    	margin: 0px 0px 0px 1px;
    	color: #000000; 
    }
    
    #menu a {
    	display: block;
    	width: auto;
    	height: 28px;
    	padding: 12px 20px 0px 20px;
    }
    
    #menu a:hover {
    	text-decoration: underline;
    }
    
    #menu .active {
    	background: #a32626 url(images/img02.gif) no-repeat 0px 0px;
    }
    
    #menu .active a {
    	background: url(images/img02.gif) no-repeat 100% -40px;
    }
    
    /* Page */
    
    #page {
    	width: 400px;
    	margin: 0px auto;
    	padding: 100px 0px;
    	
    
    }
    
    
    #table {
    	font: 17px Arial, Helvetica, sans-serif;
    	float: center;
    	position: absolute;
    	
    	}
    	
    /* This is the box in drag.html where you drag acrosss your pictures for construction */
    	
    	
    #box123{ 
    
    border-width: medium;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: #c23939;
    padding-top: 1em;
    padding-bottom: 1em; 
    padding-right: 3em;
    float: center;
    width: 700px;
    height: 375px;
    margin-top: -10px;
    margin-right: -300px;
    margin-left: 400px;
    position: absolute;
    } 
    /* This is the box around the Admin login */
    #box2 { 
    font-size: 1.5em;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 3em;  
    padding-right: 3em;
    float: center;
    width: 250px;
    height: 100px;
    margin-top: -20px;
    margin-left: 0px;
    position: absolute;
    
    } 
    
    /* This is the box around the enquirymain.html */
    
    #box3 { 
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 3em;  
    padding-right: 3em;
    float: center;
    width: 350px;
    height: 250px;
    margin-top: 35px;
    
    } 
    /* This is the box around the enquirymain.html */
    
    #alignimages { 
    
    float: center;
    margin-left: 200px;
    
    } 
    #alignheader { 
    
    float: center;
    margin-right: 200px;
    
    } 
    
    #box4 { 
    border-width: thin;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: #c23939;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 3em;  
    padding-right: 3em;
    float: center;
    width: 350px;
    height: 358px;
    margin-top: 35px;
    
    } 
    #box5 { 
    border-width: thin;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: #c23939;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 3em;  
    padding-right: 3em;
    float: right;
    width: 180px;
    height: 150px;
    margin-top: -390px;
    
    } 
    
    #box6 { 
    border-width: thin;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: #c23939;
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 4em;  
    padding-right: 1.9em;
    float: right;
    width: 180px;
    height: 160px;
    margin-top: -190px;
    margin-right: -280px;
    
    
    }
    /* This is the box in service.html */
    #box7 { 
    
    padding-top: 1em;
    padding-bottom: 1em;
    padding-left: 4em;  
    padding-right: 1.9em;
    float: center;
    width: 550px;
    height: 245px;
    margin-top: -15px;
    margin-right: 0px;
    margin-bottom: -70px;
    position: absolute;
    
    
    
    }
    
    
    #box36{ 
    
    border-width: thin;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: #c23939;
    width: 800px;
    height: 500px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: -50px;
    
    float: left;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 10.3em;  
    padding-right: 3.5em;
    font: 17px Arial, Helvetica, sans-serif;
    
    }	
    
    #box37{ 
    
    border-width: thin;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: #c23939;
    width: 250px;
    height: 85px;
    margin-top: -288px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: -50px;
    
    float: right;
    padding-left: 0.8em; 
    padding-top: 0em;
    padding-bottom: 7.3em;  
    padding-right: 1.0em;
    font: 17px Arial, Helvetica, sans-serif;
    
    }	
    /* Use to align delete.html */
    #box38{ 
    
    
    margin-top: 10px;
    margin-right: -10px;
    margin-bottom: -10px;
    margin-left: 0px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    font: 16px Arial, Helvetica, sans-serif;
    position: absolute;
    }
    
    /* Use to align update.html */
    #box50{ 
    
    
    margin-top: 30px;
    margin-right: -10px;
    margin-bottom: -10px;
    margin-left: 0px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    font: 16px Arial, Helvetica, sans-serif;
    position: absolute;
    }
    
    /* Use to align search box in Update1.php */
    
    #box51{ 
    margin-top: 240px;
    margin-right: -10px;
    margin-bottom: -10px;
    margin-left: -450px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    
    /* Use to align update boxes in update1.php */
    
    #box52{ 
    margin-top: -400px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 150px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    /* Use to picture of bad garden in service.html */
    
    #box52{ 
    margin-top: -100px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 560px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    /* Use to picture envelope in contact.html */
    
    #box53{ 
    margin-top: -50px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 175px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    /* Use to picture i in aboutus.html */
    
    #box54{ 
    margin-top: -50px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 130px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    
    /* Use to control search box in search.php */
    
    #box55{ 
    margin-top: 50px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 100px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    
    /* Use to control heading in drag.html */
    
    #box56{ 
    margin-top: -690px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 490px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    
    /* Use to control picture doors in select1.php */
    
    #box57{ 
    margin-top: -170px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 230px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    
    /* Use to control picture conservatories in select1.php */
    
    #box58{ 
    margin-top: -170px;
    margin-right: -110px;
    margin-bottom: -10px;
    margin-left: 470px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.6em;  
    padding-right: 0.4em;
    position: absolute;
    }
    
    
    /* box that controls the position of the enlarged images in ph_nav.php pic handler  */
    #boxpic{ 
    
    
    margin-top: -30px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: -250px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    /* box that controls the position of the enlarged images in ph_nav.php pic handler1 */
    #boxpic1{ 
    
    
    margin-top: -30px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: -130px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    
    
    /* position of the enlarged photos in ph_nav pic handler 2 */
    #boxpic2{ 
    
    margin-top: -30px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: -150px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    
    	
    #box { 
    border-width: thin;
    margin: 1px 1px 1px 1px;
    padding: 12px 0px 12px 12px;
    border-style: solid;
    border-width: 1;        
    border-color: black;
    padding-top: 40.0em;
    padding-bottom: 10.3em;
    padding-left: 10.3em;  
    padding-right: 15.3em;
    float: right;
    width: 500px;
    height: 300px;
    margin-top: -495px;
    
    } 
    
    
    /* position of the "door" in select1.php */
    #boxdoor{ 
    
    margin-top: 170px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: 0px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    /* position of the "conservatory" in select1.php */
    #boxcon{ 
    
    margin-top: 170px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: 0px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    /* position of the "window" in select1.php */
    #boxwin{ 
    
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: 0px;
    padding-left: 0em; 
    padding-top: 0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    /* position of the table in drag.html */
    #boxdrag{ 
    
    margin-top: -20px;
    margin-right: 0px;
    margin-bottom: -1px;
    margin-left: 30px;
    padding-left: 0em; 
    padding-top: 1.0em;
    padding-bottom: 0.5em;  
    padding-right: 0.4em;
    position: absolute;
    
    }
    
    
    
    /* Content */
    
    #content {
    	float: center;
    	width: 800px;
    	height: 325px;
    	margin-top: -60px;
    	right: 150px;
    	
    	
    }
    
    .post {
    	margin: 0px 0px 30px 0px;
    }
    
    .post .title {
    	margin: 0px;
    	padding: 0px 0px 5px 0px;
    	border-bottom: 1px solid #c49090;
    }
    
    .post .entry {
    }
    
    .post .meta {
    	font-weight: bold;
    }
    
    .post .byline {
    	margin: 0px;
    }
    
    
    
    
    /* INDEX2.HTML */
    #boxsearch {
    	width: 230px;
    	height: 300px;
    	padding: 0px 0px;
    	margin-top: -320px;
    	margin-right: -120px;
    	margin-bottom: 0px;
    	margin-left: -390px;
    	border-width: thin;
    	padding: 12px 0px 12px 12px;
    	border-style: solid;
    	border-width: 1;        
    	border-color: #c23939;
    	padding-left: 2.0em; 
    	padding-top: 0em;
    	padding-bottom: 0em;  
    	padding-right: 0.8em;
    	font-size: 0.8em;
    	position:absolute;
    
    }
    
    /* INDEX2.HTML Option values links */
    #boxsearch1  {
    	width: 230px;
    	height: 300px;
    	padding: 0px 0px;
    	margin-top: -220px;
    	margin-right: -120px;
    	margin-bottom: 0px;
    	margin-left: -395px;
    	
    	padding-left: 2.0em; 
    	padding-top: 0em;
    	padding-bottom: 0.6em;  
    	padding-right: 0.4em;
    	font-size: 1.1em;
    	position:absolute;
    
    }
    
    
    
    
    
    /* Footer */
    
    #footer {
    	clear: both;
    	width: 1257px;
    	height: 20px;
    	margin: 0px auto 30px auto;
    	background: #c23939 url(images/img06.jpg) no-repeat left top;
    	color: #FFFFFF;
    	padding-bottom: 2.0em;
    	margin-top: -30px;
    	
    
    	
    }
    
    #footer p {
    	margin: 0px;
    	padding: 19px 0px 0px 0px;
    	text-align: center;
    	line-height: normal;
    	font-size: smaller;
    }
    
    #footer a {
    	color: #FFFFFF;
    }
    
    
    .error {
    color: #CC0000;
    font-size:1.2em;
    padding-left: 10px;
    text-align: left;
    padding-right: 30px;
    border-top: solid  #CC0000 1px;
    border-left: solid  #CC0000 1px;
    border-right: solid  #CC0000 1px;
    border-bottom: solid  #CC0000 1px;
    margin:0;
    width:340px;
    }
    .error3 {
    color: #CC0000;
    font-size:0.9em;
    padding-left: 5px;
    text-align: left;
    margin:0;
    }
    .error2{
    color: #CC0000;
    font-size:0.9em;
    Last edited by oracleguy; 02-26-2009 at 04:11 PM. Reason: be kind: use code tags

  • #2
    Regular Coder BoldUlysses's Avatar
    Join Date
    Jan 2008
    Location
    Winston-Salem, NC
    Posts
    938
    Thanks
    10
    Thanked 190 Times in 187 Posts
    Oy. Next time, please post your code in &#91;CODE&#93;&#91;/CODE&#93; tags. You may also edit the above post.

    As far your images are concerned, use the title attribute:

    Code:
    <img name="table2" src="construction/table2.jpg" alt="SEATING" title="SEATING" width="100" height= "100">
    IE incorrectly displays the alt tag as a tooltip, which it shouldn't--other browsers correctly display the text on hover only if a title value is present.

    When you get a chance, you should also read up on why tables for layout are bad.
    matt | design | blog

  • #3
    New Coder
    Join Date
    Feb 2009
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks got that working.
    Wat would you recommend besides a table to hold the images in? i am new to this whole html and css business.
    Thanks

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,866
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Have a look at some table less layouts at http://www.bonrouge.com/3c-hf-fluid.php
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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