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

    Beginner Question - Probly really simple, please help!

    Hiya,

    I'm messing with HTML trying to figure it out, I thought it might be a good test to see if I could make myself a sort of home page for myself with fav internet websites.

    However i cant get my TH Img to spread all along the top. Can anyone point out what im doing wrong? Trying to set to like 400-500px but not sure if the style at the top is messing with it or if i can change it?

    Thanks in advance!

    Code:
    <!DOCTYPE html>
    
    <html>
    	
    <head>
    	
    <style>	
    img {	width:300px;
    	height:130px;
    }
    
    table, td {
    	border: 2px #000000 solid; background-color: white;
    }
    </style>
    		
    <title>WK Designz</title>
    	
    </head>
    	
    <body>
    	
    <center>
    <table>
    	
    <thead>
    	    
    <th colspan="4"><img style="width 500px" src="http://wkdesignz.com/wp-
    
    content/uploads/2013/03/wk-logo.png" /></th>
    	
    </thead>
    	
    <tbody>
    	
    <tr>
    
    <td> 
    <a href="http://www.google.com"> <img src="http://musically.com/wp-
    
    content/uploads/2013/10/Google.jpg" /></a>
    </td>
    	   
     <td>
    <a href="http://www.bbc.co.uk/iplayer/"> <img src="http://blogs.ft.com/tech-
    
    blog/files/2014/03/BBC-iPlayer-Strip-Black-Blocks-1.jpg" /></a> 
    </td>
    	    
    <td> 
    <a href="http://www.bbc.co.uk/sport/"> <img src="http://www.mediameasurement.com/wp-
    
    content/uploads/2011/10/bbc-sport-hr-253.jpg" /></a> 
    </td>
    	    
    <td> 
    <a href="http://www.youtube.com"> <img src="http://www.incgamers.com/wp-
    
    content/uploads/2013/12/youtube.jpg" /></a> 
    </td>
    	
    </tr>
    	
    <tr>
    	    <td> 
    <a href="http://www.netflix.com"> <img src="https://encrypted-tbn3.gstatic.com/images?
    
    q=tbn:ANd9GcSZQW9kR1argGn_v8QwPTeGmCsUXMawZeikgcAIvfvieCWKX-CA" /></a>
    </td>
    	    
    <td> 
    <a href="http://www.amazon.co.uk"> <img 
    
    src="http://www.thestreetsavvy.com/sites/thestreetsavvy.com/files/amazon_co_uk-
    
    logo__1080821a.jpg" /></a>
    </td>
    	    
    <td> 
    <a href="http://www.outlook.com"> <img src="http://dailygadgetry.com/wp-
    
    content/uploads/2014/03/outlook.jpg" /></a>
    </td>
       
     <td> 
    <a href="http://fantasy.premierleague.com/"> <img src="https://encrypted-
    
    tbn3.gstatic.com/images?q=tbn:ANd9GcS_TNGVHA9Z4hRAcpNQ3bxWoJE70-_86qOTvibIuOvVURmAPDg2" 
    
    /></a>
    </td> 
    </tr>
        
    <tr>
           
     <td> 
    <a href="http://www.rottentomatoes.com/"> <img 
    
    src="http://www.userlogos.org/files/logos/jumpordie/rottentomatoes_03.png" /></a>
    </td>
            
    <td> <a href="http://www.blinkbox.com/"> <img 
    
    src="http://mediacom.co.uk/media/2722588/blinkbox.jpg" /></a>
    </td>
       
    </td>
            
    <td> <a href="http://www.codecademy.com/"> <img src="http://www.webapplicationsuk.com/wp-
    
    content/uploads/2012/04/codecademy-logo.png" /></a>
    </td>
     
    </td>
            
    <td> <a href="https://www.google.co.uk/"> <img src="http://pctechmag.com/wp-
    
    content/uploads/2013/07/Google-Maps-Logo.png" /></a>
    </td>
     
    </tr>     
    </tbody>
    	
    </table>
    
    </center>	
    </body>
    
    </html>

  • #2
    Senior Coder
    Join Date
    Apr 2010
    Posts
    1,423
    Thanks
    69
    Thanked 102 Times in 101 Posts
    Is there a reason you are restricting the size in CSS and outputting larger in html?
    Been a sign maker for 7 years. My business:
    American Made Signs

  • #3
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,852
    Thanks
    160
    Thanked 2,223 Times in 2,210 Posts
    Blog Entries
    1
    Code:
    style="width  : 500px"
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    831
    Thanks
    10
    Thanked 79 Times in 77 Posts
    Need to correct the HTML (28)/CSS errors first.


    As stated, the inline styling for the image's width attribute is incorrect. Unless you don't plan to display tabular data, you should not use table tags for your page layout.
    ☠ ☠RON☠ ☠

  • #5
    New Coder
    Join Date
    May 2014
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Can you post the error which you are having while open this code in a browser.

  • #6
    New to the CF scene
    Join Date
    May 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As abduraooft said, you are missing the colon in your inline style declaration of the width so the browser is most likely ignoring it and using the 300px width you declared at the top


  •  

    Posting Permissions

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