Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Table cellspacing


  • Please log in to reply
6 replies to this topic

#1 JUICYboy

JUICYboy

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:12:48 PM

Posted 07 August 2011 - 04:03 PM

I am working with a template and after doing some google search I can't find why my cellspacing or cellpading attribute is not working. Table border works fine. I have looked at the .css page and it has no id or class concerning the table attributes..

I have also made a test sheet and it works fine so I know its not my misspelling which I sometimes miss
<html>
<body>
<table border="0" cellspacing="10">
  <td>
      <tr>It will not space</tr>
      <tr>these cells out</tr>
      <tr>in my template</tr>
      <tr>Why?</tr>
  </td>
</table>
</body>
</html>

Edited by groovicus, 08 August 2011 - 05:28 PM.


BC AdBot (Login to Remove)

 


#2 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:48 AM

Posted 08 August 2011 - 05:28 PM

It would be helpful when posting code if you would use the provided code tags. That preserves formatting, and makes code easier to read. First thing I would point out is that you are not using tables correctly. Tables have rows, and rows have cells. Rows are indicated by the <tr> tag, and cells within the table are indicated by the <td> tag. Since each row holds a single bit of content, and the cellspacing attribute applies to the td tag, you will not see anything. Try this:

<html>
<body>
<table border="0" cellspacing="10">
      <tr>
	<td>It will not space</td>
	<td>these cells out</td>
      </tr>
			
      <tr>
	<td>in my template</td>
	<td>Why?</td>
      </tr>
</table>
</body>
</html>

Edited by groovicus, 08 August 2011 - 05:34 PM.


#3 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:12:48 PM

Posted 08 August 2011 - 07:36 PM

Thanks Mr.Groovicus

I tried it and had no luck with it...
It works if I where to run a test page,
but when I added to the template it does not allow the spacing.
I checked the .css and there is no #id or .class for the table attributes
so that is not the issue.

Why will it not work in my template....

Edited by JUICYboy, 08 August 2011 - 07:36 PM.


#4 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:48 AM

Posted 08 August 2011 - 08:21 PM

I don't know why it doesn't work with oyur template. There are an infinite number of ways to put together code to display a web page, so unless I can see your code, I have no idea.

If you look at your code versus my code, you have the <tr> and <td> tags reversed. If you have done that in your code, then that would be a problem.

#5 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:12:48 PM

Posted 08 August 2011 - 08:45 PM

Yes I do see that when I originally wrote the sample I had a incorrectly nested the <tr> <td> tags.

As I am looking at my template I see that I nested them correctly as you display....

I could post my code but it is a pretty long form, thank-you I can find other solutions

#6 JUICYboy

JUICYboy
  • Topic Starter

  • Members
  • 537 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Anaheim, Ca
  • Local time:12:48 PM

Posted 09 August 2011 - 10:35 AM

I was just thinking if the Doctype had anything to do with not allowing table spacing?

#7 groovicus

groovicus

  • Security Colleague
  • 9,963 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Centerville, SD
  • Local time:10:48 AM

Posted 09 August 2011 - 11:10 AM

Nope. Again, nobody can help without seeing your code.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users