Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Using images in websites

Featured Replies

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 :D

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"

  • 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?

  • 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)

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!

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 :D

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! :)

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.