Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

slicing web layout.

Status
Not open for further replies.

alan28

Technical User
Jul 31, 2002
60
GB
Anyone know of some good tutorials on slicing a layout for the web? My tables keep collapsing when I try to set images as a background image.
 
I'm not sure I understand what's happening. You're tables shouldn't be affected at all when using a background image. Can you provide a link to your page or show the code? (Don't forget to use the
Code:
tags if you post code)

There's always a better way. The fun is trying to find it!
 
Make sure there is something in the table cell. For example:

Code:
<td background="images/mybackground"></td>
will not show any background image at all. The cell is empty and therefore compacted.

Photoshop will usually insert a spacer.gif to prevent this from happening. That looks like this:

Code:
<td background="images/mybackground"><img src="images/spacer.gif" width=10 height=10></td>

The spacer is a transparent gif that you can make any size you need to keep your design looking right.

So if you are removing the "spacer.gif" don't. That is what is keeping it open. If not then maybe something else is going on.

Good Luck,

Wow JT that almost looked like you knew what you were doing!
 
It happens when I delete the image so I can make it a background image. It is the sides of the content area. The header slice is ok.
 
Even after deleting an image the spacer needs to be there.

Empty cells have no display value. So when you "remove" the image to make it a background, put the spacer.gif in it's place. (or &nbsp;)

Hope it helps.

Wow JT that almost looked like you knew what you were doing!
 
I have solved the problem. I changed the slice setting spacer cells to always. Thank you to the people who helped.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top