4 Replies - 1226 Views - Last Post: 05 April 2014 - 10:29 AM

#1 OS_Omar Saab  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-February 14

how to remove white space in a table cell?

Posted 05 April 2014 - 09:42 AM

I have an HTML code, with a table that contain one row and one column (one cell). this cell contains a button that look alike the buttons in Apple's iOS 7.
But I have a lot of white space around the button.
How to remove it?
I tried
cellpading=0
but it didn't work.
Any help will be highly appreciated :)/> thanks in advance :)/>

Here is the HTML file (with the javascript and the css):

And to clarify this is an image with the white space that I want to remove

Is This A Good Question/Topic? 0
  • +

Replies To: how to remove white space in a table cell?

#2 OS_Omar Saab  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-February 14

Re: how to remove white space in a table cell?

Posted 05 April 2014 - 09:48 AM

I realized that the link to the image is broken :(
This is an alternative link :
Was This Post Helpful? 0
  • +
  • -

#3 andrewsw  Icon User is online

  • blow up my boots
  • member icon

Reputation: 6451
  • View blog
  • Posts: 26,096
  • Joined: 12-December 12

Re: how to remove white space in a table cell?

Posted 05 April 2014 - 09:49 AM

You have mis-spelt cellpadding but it won't work anyway. You have to remove the top and margin-bottom values from the button (a-tag) itself.

But why do you have a table with a single cell? It is unnecessary. You could use a div or a span.

This post has been edited by andrewsw: 05 April 2014 - 09:51 AM

Was This Post Helpful? 0
  • +
  • -

#4 OS_Omar Saab  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 11-February 14

Re: how to remove white space in a table cell?

Posted 05 April 2014 - 10:05 AM

View Postandrewsw, on 05 April 2014 - 09:49 AM, said:

You have mis-spelt cellpadding but it won't work anyway. You have to remove the top and margin-bottom values from the button (a-tag) itself.

But why do you have a table with a single cell? It is unnecessary. You could use a div or a span.


Actually it's a testing page. I wanna put this button in a table on my website. So I am testing its behavior in a table :)
I test everything apart, before I put it on my final webpage. So that if I write anything in the codes wrong, my website won't be affected. Hope you understand what I mean:/ I mean it's only a testing html code. forget about it.

ANYWAY thanks for your help :)
Was This Post Helpful? 0
  • +
  • -

#5 andrewsw  Icon User is online

  • blow up my boots
  • member icon

Reputation: 6451
  • View blog
  • Posts: 26,096
  • Joined: 12-December 12

Re: how to remove white space in a table cell?

Posted 05 April 2014 - 10:29 AM

Fair enough.
No worries.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1