Forum Moderators: open

Message Too Old, No Replies

Sliced a bit of a template wrong in PS

How can I "split" this cell?

         

Jeigh

12:44 pm on Apr 8, 2007 (gmt 0)

10+ Year Member



Hey guys, when I was slicing this template I had a box and I was suppose to do one slice on the right 100x145px and have the rest on the left. This is because I wanted to have a paypal verification seal on that side and then links on the other. Here is the bit of code that relates to that section:

<td colspan="8" div id="bottomcontent" style="background-image:url(images/bottomcontent.gif); width:458px; height:145px;" alt="" />
</td>

So how would I get that to be two difference cells, I messed around and tried somthing like:

<td colspan="8" div id="bottomcontent" style="background-image:url(images/bottomcontent.gif); width:358px; height:145px;" alt="" />
</td>

<td colspan="6" div id="bottomcontent" style="background-image:url(images/bottomcontent.gif); width:100px; height:145px" alt="" />
</td>

But I really had no idea what I was doing, especially with the colspan :P

Thanks for any help.

Xapti

6:04 am on Apr 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The values for colspan depend on the rest of your document.
What it does is says how many columns your cell should occupy, out of the whole table.
Think of a crossword puzzle or something... it's a grid... but the black boxes stacked beside eachother consecutively is like going colspan=x, instead of making x cells, each with black in them.
Tables are finiky things, and it seems to me that you'd have lots more understanding and customizibility if you used divs. Converting may be a tricky issue, but if you can learn how, it'd be nice.

To split 1 cell into two, you first make two cells (which you did).
Next, you cut both colspans in half. You cannot have fractional/non-whole number of colspan, meaning you can't split it more than the largest number of columns you have in the table.

Another problem you have though, is if you want them to be specific widths... you don't control widths of individual cells, really. You just control the size of each column, and each row. You can't have one cell wider than the width of it's column (of course unless you use colspan, in which case it spans multiple columns, but only in multiples of the columns width... there is no precise control)

I hope I explained myself well. I'm also not entirely correct, or didn't explain things perfect, but somone else can elaborate off me.

Again I say: tables can be pretty messy things. They aren't very good for site layout/presentation... they are used for organizing site information, like spreadsheets.

Am I allowed to post this URL? It's worded so nicely, I think it will just help this person understand what I'm trying to explain. I still don't fully comprehend where the "personal website" line is.
[htmlcodetutorial.com...]

[edited by: Xapti at 6:08 am (utc) on April 9, 2007]

Jeigh

7:09 am on Apr 9, 2007 (gmt 0)

10+ Year Member



Thanks for your detailed reply, would you know where I could find a tutorial for coding in divs? Perhaps it would be better just to do that to start with :)

Xapti

6:42 am on Apr 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



div tutorials can Be found everywhere. From the very basic, to the advanced, to the annoyingly tricky (usually dealing with special effects, IE bugfixes, etc.)
A simple google search should cover you.
One thing you should check out though (perhaps AFTER you learn the basics... because the vocabulary is very heavy) too:
[w3.org...] <--very important. IE is not FULLY compliant with it all though
[w3.org...] <--pretty important. not necessary to read it all, but excellent reference
[w3.org...] <-- follow up on previous link