Welcome Guest ( Log In | Register )



2 Pages V   1 2 >  
Reply to this topicStart new topic
> Html Table Issue.
Chesso
post Nov 7 2007, 10:50 AM
Post #1


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833



Does anyone know how I might create a HTML table but using pure CSS (div's and what not).

I really have no idea why, but for some odd reason my layout goes nuts if I try to use the table tags, even used properly with no errors the whole thing just brakes down (I don't use tables anywhere).

So I figured my only option is to attempt to do it CSS way if possible?
Go to the top of the page
 
+Quote Post
Quatrux
post Nov 7 2007, 02:07 PM
Post #2


the Q
Group Icon

Group: [HOSTED]
Posts: 980
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059



Well, you could give as an example of what you're doing, if you're doing it with tables, then everything needs to be alright, if you're doing it with CSS only and with div tags, then you may have problems understanding something, but I don't understand what kind of an answer you want, for example how to do a layout in a CSS you can easily find lots of examples on google and even tutorials and also I remember I posted a topic about 3 column layouts, it is a way to make it work in IE and other browsers normally, a layout which is flexible, fluid and can stretch, it can easily be done with CSS on a normal browser, but with IE: it doesn't support display: table-cell; as it should, there is a hack for that where javascript is involved though. smile.gif

So if you want to learn to use CSS divs to create a layout, when just google for CSS layouts, CSS 3 column layouts and etc. smile.gif
Go to the top of the page
 
+Quote Post
Numenokh
post Nov 7 2007, 07:21 PM
Post #3


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 5
Joined: 25-September 07
From: Egypt
Member No.: 25,099



Hi Chesso,


I started using DIV tags with CSS a while ago instead of TABLE tags. Honestly, it was more for convenience than due to any serious problems with tables. Plus, I was kinda trying to test some SEO-related issue.

Anyway, as Quatrux said, it would be best if you post some examples of the work you need done. Anyway, you can take a look at the source code of my pages at...

http://www.arabic-translation-help.com/

... and see if the use of DIV tags is your cup of tea. I suppose you can download the CSS file as well if you just save one of the pages to your computer -- save it as "HTML complete" not "HTML only."

Good luck :-)
Go to the top of the page
 
+Quote Post
Chesso
post Nov 7 2007, 09:08 PM
Post #4


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833



The entire layout is DIV/CSS based.

The issue is I ACTUALLY need tabular data now but using TABLE HTML tag brakes the entire layout despite not using anything related to TABLEs yet.

So i'm looking to make TABULAR data using DIV/CSS.

Which I have managed using a whole lot of   lol.
Go to the top of the page
 
+Quote Post
Quatrux
post Nov 8 2007, 07:07 AM
Post #5


the Q
Group Icon

Group: [HOSTED]
Posts: 980
Joined: 13-July 05
From: Lithuania, Vilnius
Member No.: 7,059



QUOTE(Chesso @ Nov 7 2007, 11:08 PM) *
The issue is I ACTUALLY need tabular data now but using TABLE HTML tag brakes the entire layout despite not using anything related to TABLEs yet.


Show the way you're doing it, I mean, why should a table tag break your entire layout, you're just doing something wrong in my opinion, I never really had problems with tables, the only thing about them is that you need to write a lot of tables, tds, and trs in the html with their attributes as well. tongue.gif
Go to the top of the page
 
+Quote Post
Chesso
post Nov 8 2007, 07:19 AM
Post #6


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833



Well i'll put it this way:

CODE
<table>
<tr>
  <td>&nbsp;</td>
</tr>
</table>


Brakes the entire layout....., even if I set borders, padding, margins etc, it all makes no difference, the whole page just goes nuts.

But I don't use anything at all in it to do with tables or even remotely close, so I don't know why a table or it's inner elements would cause issues.
Go to the top of the page
 
+Quote Post
vizskywalker
post Nov 9 2007, 06:10 PM
Post #7


Techno-Necromancer
Group Icon

Group: Members
Posts: 1,018
Joined: 13-January 05
From: The Net
Member No.: 2,127



Just showing us the table code probably isn't going to help. If it's layout issues, it is likely to be a problem with the surrounding layout or the placement of the table in the code. If you could show us a larger snippet, maybe we could help you. Also, which browser are you using, because that makes a big difference. In fact, the cross-browser issue makes doing tables with just CSS and HTMLDivElements is extremely difficult. I spent a couple years working on that before I gave it up, because getting it to work in even one browser is just not worth it when tables work fine unless you break something.

~Viz
Go to the top of the page
 
+Quote Post
kelvinmaki
post Nov 10 2007, 01:06 AM
Post #8


Advanced Member
Group Icon

Group: Members
Posts: 170
Joined: 30-July 07
Member No.: 23,704



QUOTE(Chesso @ Nov 8 2007, 07:19 AM) *
Well i'll put it this way:

CODE
<table>
<tr>
  <td> </td>
</tr>
</table>


Brakes the entire layout....., even if I set borders, padding, margins etc, it all makes no difference, the whole page just goes nuts.

But I don't use anything at all in it to do with tables or even remotely close, so I don't know why a table or it's inner elements would cause issues.


If you are using div/css with tables, you need to create a div class for your table. And the table need to be in that div. You can't just have a mixture of table and div/css in the root. If you know what I meant.

CODE
<html>
<body>
<div id="abc"><div>
<table>
<tr>
  <td> </td>
</tr>
</table>
<div id="abc"><div>
<table>
<tr>
  <td> </td>
</tr>
</table>
</body>
</html>


Something above will mess up the layout. I've tried it and it does for me. Put the table inside a <div> and it should solve the layout issue. So you can declare all kind of css attributes on abc div. At least it solve for me. Example below..

CODE
<html>
<body>
<div id="abc">
<table>
<tr>
  <td> </td>
</tr>
</table>
<div>

<div id="abc"><div>
</body>
</html>


Go to the top of the page
 
+Quote Post
Chesso
post Nov 10 2007, 01:33 AM
Post #9


Teh Coder
Group Icon

Group: Members
Posts: 1,053
Joined: 18-April 06
From: Australia
Member No.: 12,833



Oh I see what you mean, I should have tried that. I just haven't had that issue before, it might be something specific to how the code/tags are layed out and branched.

I have ended up using a simple but reasonably nice looking DIV table (even though it is for tabular data), but if I can get the tables to work, it would be much better source wise and give me more options with less garbage.
Go to the top of the page
 
+Quote Post
Habble
post Nov 10 2007, 04:49 AM
Post #10


Premium Member
Group Icon

Group: [HOSTED]
Posts: 255
Joined: 17-June 07
From: Tasmania
Member No.: 22,699



instead of <table>, try:
<table cellpadding="0" cellspacing="0">
or
<table style="border-width: 0px; padding: 0px; margin: 0px;">


Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Basic Tips and Tricks in HTML(15)
  2. Embedding XML into HTML(2)
  3. Rapid HTML code generation using simple PHP(8)
  4. Are Viruses Considered As 'alive'(45)
  5. Force Object To Load Last(2)
  6. Web Browsing With Vim(2)
  7. Creating Tooltips(7)
  8. Security Issue With Ctrl+c/copy On Clipboard(7)
  9. Free Shoutbox? HTML, Flash or PHP Code(24)
  10. HTM vs HTML: Whats The Difference ?(22)
  11. Lots Of Games Not Working - DirectX Issue?(8)
  12. Ever Needs To Find Out A Table Height Or With With JavaScript(2)
  13. Windows Problems "new Series"- Xp Home Edition Activation Issue(6)
  14. The Cloning Issue(40)
  15. Dreamweaver 8 Issue(8)
  1. HTML Tags(4)
  2. Tutorial: Dreamweaver, 3ds Max, Flash, Html, Css(8)
  3. Html Basic Tutorial(8)
  4. About Html(15)
  5. Nvu(2)
  6. Html Table Rows Problem [solved](1)
  7. Sitepoint's Css And Html Reference Sites(2)
  8. W3 Schools(1)
  9. Increase Your Knowledge Of Html Language(7)
  10. Javascript Tutorial For Beginner(0)
  11. Yaml - (x)html/css Framework(2)
  12. Style P And H? Html Tags(1)
  13. Computer Not Boot Up(5)


 



- Lo-Fi Version Time is now: 4th July 2008 - 04:27 PM