Using images in websites

liunx

Guest
I'm currently trying to learn how to design websites (at the moment i know CSS, HTML and PHP quite well). Im currently trying to make a menu using a table.<br /><br />The background colors of the table cells will be defined using CSS, however, the cell above that cell should have an image inside it (which will make a cell with rounded corners)<br /><br />At the moment, this is the HTML i have written:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><table border = '0' style = 'table-layout:fixed;border-collapse:collapse;'><br />    <tr><br />        <td><img src = <!-- m --><a class="postlink" href="http://www.webdesignerforum.co.uk/lofiversion/index.php/'file&">http://www.webdesignerforum.co.uk/lofiv ... 'file&</a><!-- m -->#58;///C:/Users/Alexk/Documents/photoshop%20files/title01.png' style = 'width:100%;height:16px;'></td><br />        <td><img src = <!-- m --><a class="postlink" href="http://www.webdesignerforum.co.uk/lofiversion/index.php/'file&">http://www.webdesignerforum.co.uk/lofiv ... 'file&</a><!-- m -->#58;///C:/Users/Alexk/Documents/photoshop%20files/title01.png' style = 'width:100%;height:16px;'></td><br />        <td><img src = <!-- m --><a class="postlink" href="http://www.webdesignerforum.co.uk/lofiversion/index.php/'file&">http://www.webdesignerforum.co.uk/lofiv ... 'file&</a><!-- m -->#58;///C:/Users/Alexk/Documents/photoshop%20files/title01.png' style = 'width:100%;height:16px;'></td><br />    </tr><br />    <tr><br />        <td style = 'background-color:#ff3333;font-family:"trebuchet ms";valign:center;'>Hello</td><br />        <td style = 'background-color:#ff3333;font-family:"trebuchet ms";valign:center;'>Hello</td><br />        <td style = 'background-color:#ff3333;font-family:"trebuchet ms";valign:center;'>Hello</td><br />    </tr><br /></table><!--c2--></div><!--ec2--><br /><br />However the result is horrible (although i wasn't expecting it too look great anyway, but still...) There are gaps between the images and the rest of the table. Should i add padding, margin properties etc too the images/table cells, or is there a simpler way<br /><br />Any help or advice style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> <img src="http://www.webdesignerforum.co.uk/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><!--content-->
Why are you using a table, wouldn't css be better?<br /><br />Anyway for what you are doing to get rid of the space around your images, add this to the main table tag:<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->cellspacing="0" cellpadding="0"<!--c2--></div><!--ec2--><br /><!--content-->
Thankyou so much for that, its fixed my problem <img src="http://www.webdesignerforum.co.uk/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />, by the way, about CSS, i know how to use CSS to change the properties of tables, images, links etc. But ive always assumed its too complicated to make a webpage using target="_blank">http://www.w3schools.com/css/<br /><br /><br />there is a good place to start, there are also some tutorials style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><!--content-->
I have learnt PHP, SQL, HTML, and some CSS using w3schools, however i cant find a way to layout a complex website, such as menu components etc without using absolute positioning, and i have always assumed this is too much work (especially if the website is being created without a WYSIWYG editor)<!--content-->
sorry but you can't have websites linking to folders in OUR computer that arn't there! here<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><head><br /><title>Your Site Name</title><br /><style type="text/css"><br /><!--<br />.welcome {<br />    background-image: url(root/to/yoursite/images/welcome.png);<br />    height: 150px;<br />    width: 300px;<br />    font-family: Arial;<br />    font-size: 12px;<br />    color: #000000;<br />}<br />--><br /></style><br /></head><br /><br /><body><br /><div class="welcome">Welcome!</div><br /></body><br /></html><!--c2--></div><!--ec2--><br /><br />I quickly typed that up for you, hope it helps! it's got css in it!<!--content-->
not really, have a look at this:<br /><br />http://www.webdesignerforum.co.uk/index.ph...rticle&id=4<br /><br /><br />I used to code with tables all the time but I find using CSS is a lot easier then tables. Its a lot less messy and you can do so much more then you can with a table based layout. You should really give it a go rather then assuming that it is more complex. I have been hand coding websites for around 10 years now and seriously find css based layouts a lot easier o work with then tables...you just have to learn how, and its not that difficult to pick up <img src="http://www.webdesignerforum.co.uk/style_emoticons/default/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /><br /><br /><!--content-->
ya its so much easier using css. I design all my pages using css and divs, style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
I'm sorry if this is against the rules. I couldn't find the rules in any post so I'm sorry.<br />I learned CSS tableless layouts from here: <!-- m --><a class="postlink" href="http://www.tutorialtastic.co.uk/tutorial/c...ableless_layout">http://www.tutorialtastic.co.uk/tutoria ... ess_layout</a><!-- m --><!--content-->
Best off to learn CSS from the start.... continuing with tabular based design is like trying to upgrade a commadore 64 to compete with todays computers, it's a dead technology! Better to spend your time learning something useful <img src="http://www.webdesignerforum.co.uk/style_emoticons/default/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /><!--content-->
 
Top