This is a discussion on "Small php table" within the PHP Forum section. This forum, and the thread "Small php table are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Small php table
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
||||
|
||||
|
Small php table
Last edited by Oak; Mar 2nd, 2008 at 17:56. |
|
|
|
#2
|
||||
|
||||
|
Re: Small php table
Should I have posted this in php section?
|
|
#3
|
|||
|
|||
|
Re: Small php table
Yes.
Moved to PHP Forum.
Last Blog Entry: Happy New Year! (Dec 31st, 2007)
|
|
#4
|
||||
|
||||
|
Re: Small php table
Any ideas?
|
|
#5
|
||||
|
||||
|
Re: Small php table
What table are you on about? I don't see any differences!
__________________
Marc Staff Manager - Webforumz.com Want to be a moderator? PM me. |
|
#6
|
||||
|
||||
|
Re: Small php table
Top image is FF
Bottom is IE7 |
|
#7
|
|||
|
|||
|
Re: Small php table
I have seen this a few times before and have fixed it by adding cellspacing to the table tag in the HTML code and border-spacing to the CSS code as shown below:
<table class="indexpage" cellspacing="5px"> .indexpage { border-spacing: 5px; } Doing this seems to make it work on all browsers. |
|
#8
|
||||
|
||||
|
Re: Small php table
before
Last edited by Oak; Mar 3rd, 2008 at 14:11. |
|
#9
|
|||
|
|||
|
Re: Small php table
You now have an id and a class in your HTML table tag, you need to have one or the other. Try removing class="indexpage" from the table tag and adding border-spacing: 5px; to the timetable1 class in your CSS code.
Last edited by kerrsmith; Mar 3rd, 2008 at 15:47. |
|
#10
|
||||
|
||||
|
Re: Small php table
1 element with an id and class is perfectly acceptable.
__________________
Jack Franklin - Webforumz Moderator (x)HTML | CSS | PHP | MySQL | JQuery (Javascript) Contact: My Blog | Twitter | Delicious Want Lessons? PM me. If you think I've helped, please press the 'Thanks' Button.
Last Blog Entry: A Week with VBulletin (Aug 28th, 2008)
|
|
#11
|
|||
|
|||
|
Re: Small php table
Yes, although you can use both id and class within an single element in this particular case it is not really necessary - it makes sense just to add the required code to the id already created in the CSS code - if only to keep the code neat and tidy.
|
|
#12
|
||||
|
||||
|
Re: Small php table
Quote:
|
|
#13
|
|||
|
|||
|
Re: Small php table
You need to apply border-spacing to the whole table not just the th and td tags. Try adding the following to your CSS code:
#timetable1 { border-spacing: 5px; } |
|
#14
|
||||
|
||||
|
Re: Small php table
Nope, still no good.
|
|
#15
|
||||
|
||||
|
Re: Small php table
ok, back to basics here:-
Define you table as such:-
If you need padding in cells and spacing between them, then define it in the CSS.
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#16
|
||||
|
||||
|
Re: Small php table
Rob, This still did not create any spacing.
{ background: #ccc; padding: 5px; text-align: left; border-spacing: 5px; cell-spacing: 2px; width:445px } #timetable1 td { border-spacing: 5px; background: #E2E4E7; padding: 5px; text-align: left; cell-spacing: 2px; width:445px } #timetable1 { border-spacing: 5px; cell-spacing: 2px; width:445px } |
|
#17
|
||||
|
||||
|
Re: Small php table
To me, this is an HTML or CSS question
The solution here is simple: Don't use an html table. All you have here is a large box with two styles of a smaller box inside. The CSS is so basic I won't even bother to do sample code. RANT WARNING! HTML tables are on the way out. They usually don't save time in the long run during coding, they add processing overhead, and as your problem shows, browser implementation is quirky and even horrific. Improving table rendering is a very low priority for the besieged browser industry so don't expect it to improve much. There might be reasons to use them in the short run: better valign support, features you already know and don't want to take the time to reproduce in CSS (like colgroup), or an existing import function from another code source might be three. But most likely these will slowly disappear. Now, if we could just code form elements. |
|
#18
|
||||
|
||||
|
Re: Small php table
Mason, oak is trying to display tabular data. The need for a table in this instance is not only self evident, but highly reccomended -especially when done properly with table headers.
Oak, are you saying you actually want spacing between cells?
__________________
Click the 'Thanks!' button if this post has helped you Rob - Webforumz Founder
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
#19
|
||||
|
||||
|
Re: Small php table
You were using WAY to much code.... Try:---
|