September 8, 200719 yr 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. 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) At the moment, this is the HTML i have written: <table border = '0' style = 'table-layout:fixed;border-collapse:collapse;'> <tr> <td><img src = 'file:///C:/Users/Alexk/Documents/photoshop%20files/title01.png' style = 'width:100%;height:16px;'></td> <td><img src = 'file:///C:/Users/Alexk/Documents/photoshop%20files/title01.png' style = 'width:100%;height:16px;'></td> <td><img src = 'file:///C:/Users/Alexk/Documents/photoshop%20files/title01.png' style = 'width:100%;height:16px;'></td> </tr> <tr> <td style = 'background-color:#ff3333;font-family:"trebuchet ms";valign:center;'>Hello</td> <td style = 'background-color:#ff3333;font-family:"trebuchet ms";valign:center;'>Hello</td> <td style = 'background-color:#ff3333;font-family:"trebuchet ms";valign:center;'>Hello</td> </tr> </table> 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 Any help or advice on this would be appreciated :D
September 8, 200719 yr Why are you using a table, wouldn't css be better? Anyway for what you are doing to get rid of the space around your images, add this to the main table tag: cellspacing="0" cellpadding="0"
September 8, 200719 yr Author Thankyou so much for that, its fixed my problem , 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 only CSS. Do you have any good links to tutorials that might come in handy?
September 8, 200719 yr http://www.w3schools.com/css/ there is a good place to start, there are also some tutorials on this forum in the tutorials subforum which could help you as well
September 8, 200719 yr Author 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)
September 8, 200719 yr sorry but you can't have websites linking to folders in OUR computer that arn't there! here <head> <title>Your Site Name</title> <style type="text/css"> <!-- .welcome { background-image: url(root/to/yoursite/images/welcome.png); height: 150px; width: 300px; font-family: Arial; font-size: 12px; color: #000000; } --> </style> </head> <body> <div class="welcome">Welcome!</div> </body> </html> I quickly typed that up for you, hope it helps! it's got css in it!
September 8, 200719 yr not really, have a look at this: http://www.webdesignerforum.co.uk/index.ph...rticle&id=4 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
September 8, 200719 yr ya its so much easier using css. I design all my pages using css and divs, once you learn it, it makes web design so much easier. And makings menus is a lot easier with css too!
September 9, 200719 yr I'm sorry if this is against the rules. I couldn't find the rules in any post so I'm sorry. I learned CSS tableless layouts from here: http://www.tutorialtastic.co.uk/tutorial/c...ableless_layout
September 10, 200719 yr 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
Create an account or sign in to comment