cell spacing |
cell spacing |
kasmador |
Dec 6 2008, 08:54 PM
Post
#1
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
Hey,
I want to be able to have different cell spacing. On top and bottom I want it to be 0. On the sides I want it to be 20. How do you do this? The page: CODE <html> <head> <title> Browsing <!-- #echo var="URL" encoding="reverse-url" --> </title> <style type="text/css"> body {background-color: #000000; color: #FF0000; text-align: center} h1 {size: 110%; text-decoration: underline} a:link {color: #FF0000} a:visited {color: #00FF00} a:hover {color: #FF00FF} </style> </head> <body> <h1>Browsing <!-- #echo var="URL" encoding="reverse-url" --></h1> <table border="0" cellspacing="20" align="center"> <tr> <th align="center">Name</th> <th align="center">Size</th> <th align="center">Type</th> </tr> <tr> <td align="center"><a href="<!-- #echo var="DIRLIST_FILE_URL" -->"><!-- #echo var="DIRLIST_FILE_NAME" --></a></td> <td align="center"><!-- #echo var="DIRLIST_FILE_SIZE" --> </td> <td align="center"><!-- #echo var="DIRLIST_FILE_MIME_TYPE" --> </td> </tr> </table> </body> </html> Just doing things myself I think that there is better ways of doing them. EX: for the table I aligned it "center" in the <table>. Would this be better done if it was in the css under table {align: center}. I have tried this but could not get it to work... thanks to all This post has been edited by kasmador: Dec 6 2008, 08:55 PM |
Darin McGrew |
Dec 6 2008, 11:30 PM
Post
#2
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
With CSS, you can specify padding for the td elements, and you can specify different padding for all four sides.
|
kasmador |
Dec 7 2008, 12:17 AM
Post
#3
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
could you explain further, I'm pretty new to all this. I just added to this free script I found.
|
Darin McGrew |
Dec 7 2008, 01:45 AM
Post
#4
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Please see the FAQ entry Where can I learn about CSS?
|
kasmador |
Dec 7 2008, 05:17 PM
Post
#5
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
Padding is added inside the cell, thus making the name of the file or the size create a second line to compensate for the lack of space. Not what I want.
I want to keep it looking like. The only difference is I want space between the colums. The padding would work if I gave my table a width, but I want it to be all automatic. The cells are as big as the longest name, all in one line. Like this, but take the spacing off the top and bottom, just keep it on the sides. thanks This post has been edited by kasmador: Dec 7 2008, 05:27 PM |
Frederiek |
Dec 8 2008, 03:45 AM
Post
#6
|
Programming Fanatic Group: Members Posts: 5,146 Joined: 23-August 06 From: Europe Member No.: 9 |
|
Darin McGrew |
Dec 8 2008, 01:10 PM
Post
#7
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
Ah, I understand. That's the separated borders model in CSS 2.1. I don't use it much myself, so I didn't consider it.
Anyway, the border-spacing property can take two values. The first is the horizontal spacing, and the second is the vertical spacing. So you might try something like CODE border-spacing: 1em 0 |
kasmador |
Dec 8 2008, 06:53 PM
Post
#8
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
ok cool. thanks thats what I wanted.
Now another question, If I should create a new topic tell me. This is how it looks like now. I want to make the first line : Name Size Type : have bigger font. I have already used "th" instead of "td" but it does not make a huge difference. I've tried a few things myself with no success. This post has been edited by kasmador: Dec 8 2008, 06:53 PM |
Darin McGrew |
Dec 8 2008, 07:02 PM
Post
#9
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
You can specify a different font size for the th elements:
CODE th { font-size: 200% } |
kasmador |
Dec 9 2008, 01:22 PM
Post
#10
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
thanks,
another question. You see the .../, this is to go up a directory, how would you change that to some writing, like back or something. it uses this script:td align="center"><a href="<!-- #echo var="DIRLIST_FILE_URL" -->"><!-- #echo var="DIRLIST_FILE_NAME" --></a></td> So how would you change the first one? thanks |
pandy |
Dec 9 2008, 01:55 PM
Post
#11
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
How do you mean?
|
kasmador |
Dec 9 2008, 07:38 PM
Post
#12
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
the first thing under the NAME is ".../" This is to go up a directory. I would like to change that to "back". Is this possible?
|
pandy |
Dec 9 2008, 08:12 PM
Post
#13
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
You mean you want to mimic the browser's back button? If they came from Google, they'll go back to Google?
CODE <!--#echo var="HTTP_REFERER" --> |
kasmador |
Dec 9 2008, 11:40 PM
Post
#14
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
I want to change what I have circled to BACK/. Is that possible. Here is the code CODE <html> <head> <title> Browsing <!-- #echo var="URL" encoding="reverse-url" --> </title> <style type="text/css"> body {background-color: #000000; color: #FF0000; text-align: center} h1 {size: 110%; text-decoration: underline} a:link {color: #FF0000} a:visited {color: #00FF00} a:hover {color: #FF00FF} table {table-layout: automatic; border-spacing: 2em 0} th {font-size: 130%} </style> </head> <body> <h1>Browsing <!-- #echo var="URL" encoding="reverse-url" --></h1> <table border="0" align="center"> <tr> <th align="center">Name</th> <th align="center">Size</th> <th align="center">Type</th> </tr> <tr> <td align="center"><a href="<!-- #echo var="DIRLIST_FILE_URL" -->"><!-- #echo var="DIRLIST_FILE_NAME" --></a></td> <td align="center"><!-- #echo var="DIRLIST_FILE_SIZE" --> </td> <td align="center"><!-- #echo var="DIRLIST_FILE_MIME_TYPE" --> </td> </tr> <a href="http://www.danasoft.com"><img src="http://www.danasoft.com/sig/57380.jpg" border="0"></a><div style="font-family:arial,sans-serif;font-size:11px;"></a></div> </table> </body> </html> This post has been edited by kasmador: Dec 9 2008, 11:40 PM |
pandy |
Dec 10 2008, 12:13 AM
Post
#15
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
Do you mean the link text? What's shown on the page? Can't you just type it?
|
pandy |
Dec 10 2008, 12:19 AM
Post
#16
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
OK, that's a template for a directory listing using Abyss, is that right?
|
kasmador |
Dec 11 2008, 01:34 PM
Post
#17
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
yes that is. I modified it.
Under the name column the first one is to go back. It says ".../" I want it to say "back/". Is this possible? |
pandy |
Dec 12 2008, 07:35 PM
Post
#18
|
🌟Computer says no🌟 Group: WDG Moderators Posts: 20,730 Joined: 9-August 06 Member No.: 6 |
If Abyss has a configuration file where these things are defined I guess you can. Otherwise you can't.
|
kasmador |
Dec 12 2008, 09:37 PM
Post
#19
|
Group: Members Posts: 9 Joined: 6-December 08 Member No.: 7,269 |
this is all I can change
CODE <html> <head> <title> Browsing <!-- #echo var="URL" encoding="reverse-url" --> </title> <style type="text/css"> body {background-color: #000000; color: #FF0000; text-align: center} h1 {size: 110%; text-decoration: underline} a:link {color: #FF0000} a:visited {color: #00FF00} a:hover {color: #FF00FF} table {table-layout: automatic; border-spacing: 2em 0} th {font-size: 130%} </style> </head> <body> <h1>Browsing <!-- #echo var="URL" encoding="reverse-url" --></h1> <table border="0" align="center"> <tr> <th align="center">Name</th> <th align="center">Size</th> <th align="center">Type</th> </tr> <tr> <td align="center"><a href="<!-- #echo var="DIRLIST_FILE_URL" -->"><!-- #echo var="DIRLIST_FILE_NAME" --></a></td> <td align="center"><!-- #echo var="DIRLIST_FILE_SIZE" --> </td> <td align="center"><!-- #echo var="DIRLIST_FILE_MIME_TYPE" --> </td> </tr> <a href="http://www.danasoft.com"><img src="http://www.danasoft.com/sig/57380.jpg" border="0"></a><div style="font-family:arial,sans-serif;font-size:11px;"></a></div> </table> </body> </html> |
Darin McGrew |
Dec 13 2008, 03:01 AM
Post
#20
|
WDG Member Group: Root Admin Posts: 8,365 Joined: 4-August 06 From: Mountain View, CA Member No.: 3 |
This is question turns out to be about server-side programming, not markup, so I've moved it accordingly.
|
Lo-Fi Version | Time is now: 18th April 2024 - 02:13 PM |