Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / a bit of HTML + IE help?

Author
Message
Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 6th Dec 2006 15:49 Edited at: 6th Dec 2006 15:55
Hey guys. I'm working on my website at the moment, and want to use 2 DIV layers. However when i load the page in IE7, the second one doesn't appear, unlike in firefox, where it displays perfectly (obviously).

after a cursory glance at google, it looks like IE7 might have problems with using DIVs and CSS. which is possibly the stupidest thing ever, as you can't really use one effectively without the other.


Does anyone have suggestions for a work around?

the page is here: http://www.graphicfilth.com/index1.php

cheers.

Martin

I don't have a sig, live with it.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 6th Dec 2006 16:03
from memory set something even a <! --> tag in the 2nd div so IE thinks it has something in it.

Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 6th Dec 2006 16:23
Also, for the love of god, why tables? And even worse, a div inside a table?

Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 6th Dec 2006 16:30
yeah, i can get rid of the tables actually. But i've fixed the problem with javascript.

Basically, IE has a problem when rendering DIV tags, whereas every other browser renders them as they appear on the page, IE gets them, and then renders them ontop of each other. To fix it, I got javascript to move it when the page is loaded.

I don't have a sig, live with it.
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 6th Dec 2006 21:31
I like the domain name

Kaurotu
18
Years of Service
User Offline
Joined: 20th Oct 2006
Location: My Computer Chair
Posted: 6th Dec 2006 22:44
Yeah IE sucks for CSS support. Anyway never use tables, CSS is much more effective. Also check out http://www.webdeveloper.com, they have great web design forums for HTML, CSS, Java, Javascript, ASP, MySQL, PHP, and a lot more.

Manic
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Completely off my face...
Posted: 8th Dec 2006 01:45
Quote: "I like the domain name "


cheers, i wanted something quite memorable

I don't have a sig, live with it.
VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 8th Dec 2006 13:15
Quote: "never use tables"


So, Ok, if you have a data set that you want to display on a page, in a tablature format, what would you recommend using over a table?
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 8th Dec 2006 13:22
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 8th Dec 2006 13:36
There is still a need for tables, specially forums. There are some table-like tags in CSS but they currently don't work in all browsers (IE being main one), so tables are here to stay for some time.

Boo!
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 8th Dec 2006 14:15
No, there's nothing actually "table-like" in CSS, but with divs and such, you have way more control. I havent seen a browser that doesnt properly support borders around divs. IE is ok as long as you remember to take it out of quirks mode using the proper header for your html files, and then it's pretty standard-compliant

VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 8th Dec 2006 16:04
Seriously, are you advocating using a list of divs / spans, made to simulate a table layout, such as this forum for example?

Would that mean a seperate div for each table "Cell"? Thus all cells are unrelated? Thus cells lining up into rows & columns is not automatic?

perhaps you could jot down a quick css example to explain how you'd do this form page using no tables?
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 8th Dec 2006 16:11
Right, lets say just the 2 boxes for speed-sake. The html would be



Css:



This is totally from my head, but it should work

Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 8th Dec 2006 16:40
more importantly though, divs dont like to be good like this forum. I would really recommend tables for forums. Until CSS can take a table like format as an option, tables are the way.

http://phoenixophelia.com

Steve J, less, and less Controversial!
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 8th Dec 2006 17:23
Quote: "divs dont like to be good like this forum"


What?

VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 8th Dec 2006 17:31
@Kentaree - I see what you're saying but I'd like to see something a little more complex than 2 table cells. How about a 4 X 4 grid at least, one that will stretch & shrink with the window resize etc?
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 8th Dec 2006 21:48
Kentaree is right, Div's are the way forward. I swear by CSS and I offer a £/$10000 reward to anyone who can find one in the sites I have designed so far. A 4 x 4 grid is easy and if you want to see my CSS table class you can.

VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 9th Dec 2006 00:47
Quote: "£/$10000 reward to anyone who can find one in the sites I have designed so far.

A 4 x 4 grid is easy and if you want to see my CSS table class you can."


I'd rather not, my browser doesn't seem to like your site much, so please can you post the code here for a 4 X 4 grid, acting like a table, that can scale with a window resize, for us all to admire / learn from?
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 9th Dec 2006 01:28
If you need a table why would you simulate it with divs instead of just using a table?
By not using a table to structure tabular data aren't you missing the point of using divs instead of tables for layout?

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 9th Dec 2006 01:44
hmm, sorry kantaree, morning. What I meant was that that css, unless using a quite a few hacks, couldnt generate a site like this, which is compatible in every browser I know of=).

http://phoenixophelia.com

Steve J, less, and less Controversial!
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Dec 2006 01:57
with most larger sites i've worked on if you say table instead of div, most people start laughing.
that said the last one i worked on for yamaha has combos of both, as its not completely ported to better standards.

Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 9th Dec 2006 04:43
Same, but for a forum it is over tedious, and under supported. I think tables are the way to go on it. Of course, that doesnt mean no divs, just for the actual forum bit, it is far to tedious.

http://phoenixophelia.com

Steve J, less, and less Controversial!
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 9th Dec 2006 09:56 Edited at: 9th Dec 2006 10:07
When you say on resize I presume that you mean when the window is readjusted and then refreshed, not updating on the fly...

CSS:



HTML:



or something like that...


[edit: missed off closing DIV]


[edit2: Just as a point of interest I tend to use PHP to set the width of the table (eg by echoing out the value) so that I can change the width at just the one place and not everywhere throughout the code. You could also use Javascript if you wanted as well]

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
Jeku
Moderator
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Vancouver, British Columbia, Canada
Posted: 9th Dec 2006 19:40
Can someone tell me the problem with using tables. What is the purpose of using CSS to make a table, when it takes less work to use the table command?

Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 10th Dec 2006 00:15
@Jeku, it's a question of web standards. Css is what's used to set styles and layout of a page, so the question is why use tables, when CSS is more flexible?

the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 10th Dec 2006 01:25
Quote: "Css is what's used to set styles and layout of a page, so the question is why use tables, when CSS is more flexible?"


There is more to a document than it's appearance. It also has structure, paragraphs, headings, tabular data etc.
If you only use divs you are removing structure from the html and putting it into the css.
With the exception of reduced page sizes and improved maintainability isn't this just as bad as old school html without css?

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 10th Dec 2006 02:17
Quote: "When you say on resize I presume that you mean when the window is readjusted and then refreshed, not updating on the fly"


Thanks for the snippet but I atually meant updating on the fly, effectively simulating a table, such as used on this forum, whereby when the window is resized (or maximised for example), then the "table" expands according, as if it had a width set to somewhere near 100%.

Nevetheless, I think what you've demonstrated quite nicely is the overhead, both in terms of developer time, code readability & download time, of attempting to use divs to do what a table is designed to do. Also, what is that "ClearBoth" div for? Is that a hack of some sort?

Bearing in mind what the_winch and others are saying, surely the sensible route is to use a table which has css styling (ie tabular data is always tabular, regardless of style, so use a table and style it to taste)?
Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 10th Dec 2006 02:22
Yes, even a few books such as Bulletproof Web design state what you said VR2=). That is what I have been trying to explain.

http://phoenixophelia.com

Steve J, less, and less Controversial!
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 10th Dec 2006 18:16
VR2,
Well as Kentaree said it's all about standards. Plus it isn't that unreadable, once you have used it a few times you pick it up, its like anything. On the subject of the resizing, it does work to a certain extent if you give it a go. In terms of overheads therefore the coding time reduces once you know whats happening, the download time is marginal and is worth the payoff for more flexibility. On the subject of the ClearBoth it basically makes sure that it displays properly, again a marginal payoff for improved performance.

At the end of the day it seems your pretty set on not embracing the technologies available but still, give it a try and see if it works for you.

Well, thats my thoughts anyway

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 10th Dec 2006 18:39
Show me the standard that says you should only use divs and I'll give you the £10,000.
The whole point of css is to separate the presentation (css) from the content (html).
After separating the presentation from the content why would you then move parts of the content from the html into the css?
That's not embracing technology, it's just reading something that said tables where bad and not understanding why.
Tables for layout are bad because you end up with presentation in the html.
Tables for tabular data are good because the content is in the html and presentation in css.
Divs for tabular data are bad because you end up with content in css.

By way of demonstration, he emitted a batlike squeak that was indeed bothersome.
PowerSoft
20
Years of Service
User Offline
Joined: 10th Oct 2004
Location: United Kingdom
Posted: 10th Dec 2006 18:46
haha, nice way of putting it with that money wager.

At the end of the day though it comes down to personal opinions and tastes. I agree with your claim about tables for layouts, it's an unneeded use of tables. With the use of it for tabulated data though it is a valid point BUT as technologies advance the use of it might be an idea. You could argue "why fix something that isn't broken" but there wasn't anything broken about good old fashioned pen&paper or typewriters to write letters (they served the purpose). Then computers came along an Word, Notepad, OpenOffice etc and people start using that. Why don't they use the typewriters..?

The Innuendo's, 4 Piece Indie Rock Band
http://theinnuendos.tk:::http://myspace.com/theinnuendosrock
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 10th Dec 2006 19:02
Nice.

I have written quite a few websites recently and have done a lot of reading about the tables vs css debate and it is becoming clear that tables are not the spawn of the devil that a lot of people make out.

I do admit that the basic layout of a site can be neater with css layers and viewing the source code there is a hell of a lot less clutter, but for data tables, forums, spreadsheet formats, then tables are the only decent way to show them, specially tables where the data controls the widths of every row of a column.

Mixing tables and divs is frowned upon by some css fanboys but I don't care about them. My sites look lovely and have all sorts of layers and tables in them.

It is said that search engines prefer less cluttered source code and prefer a higher ratio of actual text vs html code and so sticking as much stuff in your css file is a good idea and we know that tables take up a lot of html with all them tr's and td's. Personally though I don't think it makes too much difference.

Boo!
Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 10th Dec 2006 21:31
Spooky is 100% correct. As I have been saying, tables are good for things. It isnt just my opinion, but a large portion of good designers, including Dan Cederholm, and Eric Meyer. I personally thing Eric Meyer pushes it a bit far, but that is my opinion=P

http://phoenixophelia.com

Steve J, less, and less Controversial!
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 10th Dec 2006 22:02
View the source code of Microsoft's home page and what do you think you find. A right mish-mash of tables and divs.

Amazon - same thing but even messier - even storing all css styles in the html page instead of linked stylesheet.

Apple - same again.

In fact so many top sites mix and match tables and css.

So maybe time to end this bickering and just let people do whatever they like. I get really annoyed when people say you must use css and dump tables.

In fact if anyone else says it I'm gonna haunt you for te rest of your life.

Boo!
Kaurotu
18
Years of Service
User Offline
Joined: 20th Oct 2006
Location: My Computer Chair
Posted: 10th Dec 2006 23:29
Quote: "Quote: "never use tables"

So, Ok, if you have a data set that you want to display on a page, in a tablature format, what would you recommend using over a table?"


What I meant was don't use table for design layout. Don't be sarcastic.

Steve J
18
Years of Service
User Offline
Joined: 22nd Apr 2006
Location: Vancouver, Washington
Posted: 11th Dec 2006 00:21
You know what sarcasm is Kaurotu right? He wasnt being sarcastic... he was actually asking what you would use.

http://phoenixophelia.com

Steve J, less, and less Controversial!
Kaurotu
18
Years of Service
User Offline
Joined: 20th Oct 2006
Location: My Computer Chair
Posted: 11th Dec 2006 04:04
Quote: "You know what sarcasm is Kaurotu right? He wasnt being sarcastic... he was actually asking what you would use."


Well, sometimes people just have that "tone" of sarcasim. It comes up a lot.

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 11th Dec 2006 04:26 Edited at: 11th Dec 2006 04:28
Quote: "@Jeku, it's a question of web standards"

The real question is, do web standards actually mean anything? According to the most popular web browsers, apparently not.

Tempest - P2P UDP Multiplayer Plugin (DBP/DBCe)
Download the free version
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 11th Dec 2006 10:53
@Ben: And that's the catch 22 situation, if no one goes by the standards, no browser will properly support them. Most non-IE browsers are quite standard-compliant. This doesn't mean that if a site is non-standard it wont work, it means that sites that are standard are more likely to work better.
Also, IE7 is supposed to be fairly decent when it comes to standards (hearsay, I don't use it)

Point taken about tables, I agree it's preference more than anything. A lot of my dislike for tables is that a lot of "web developers" (note the strong emphasis) use it for general layout, I agree that for forums they might be better depending on preference, I still prefer DIVs.
About scaling though, percentages are your friends, as well as a bit of smart coding

Kaurotu
18
Years of Service
User Offline
Joined: 20th Oct 2006
Location: My Computer Chair
Posted: 12th Dec 2006 01:14
Quote: "The real question is, do web standards actually mean anything? According to the most popular web browsers, apparently not. "


Actually yes web standards have to be taken into consideration for every web page. The W3C provides the layout for all standards that web developers have to go by. Some things work in Mozilla and Opera that don't work in IE and vice versa. IE is known for being slow to catch up to those standards.

dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 12th Dec 2006 01:35
Well, this isn't a proven well known fact (to my knowledge so I don't have any links or anything) but I THINK that the reason to use the Web Standards is so older Browsers can recognize our webpages too. But you can't quote me on that one.

@Manic:
I get a few Javascript errors when visiting your page:
Quote: "When I first load it it says: Line 10: Invalid Character
then It says
Line 134: Object doesn't support this property or method
THEN it says
Line 70: winH is not defined."

Just thought I'd let you know.

Take heed, never take advantage of the things you need, never let your self be overcome by greed. Walk a strigh line, pick up your speed and try. Everyone deserves a piece of the pie By: Shaggy
Kentaree
22
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 12th Dec 2006 14:46
@dabip: No, not exactly. The main point to standards should be obvious, if there were none, there'd be no world-wide-web, because you'd need different browsers to support different sites, as they'd probably all have different ways to view. HTML already is a standard if you think of it.
XHTML is relatively new, the main point for it a couple of years back was that stuff like mobile phones can only read properly formed XHTML pages, although that's now changed aswell. But if everyone sticks to standards, and browsers accept those standards, you don't have to worry about which browser to use, because it'll work the same in all.

VR2
19
Years of Service
User Offline
Joined: 14th Mar 2005
Location:
Posted: 12th Dec 2006 17:42
And so it goes on...

The thing is, it seems to me, that strictly speaking, we should all be writing our web pages as XML documents with a server side XSLT transform applied depending on the client, meaning that our page content can be delivered & taylored to suit each client, with full accessability, from Mobile Phone to PSP to Blackberry to Mac to IE7 on Windows, and then downgrading down to Netscape 2 or whatever.

But how many of us actually do that? I know I don't! Just like I don't write tables by cleverly styling div tags. Just like, I don't make umpteen versions of my site, one for Flash, one for Java, one XHTML, a vanilla HTML 3, a print version, a speaking version etc etc.

I'm all for conformance between the major browsers, especially when it comes to the DOM and scripting support (for AJAX) but I think I'll probably wait until the TABLE tag is removed from browser support before I'll stop using it for tabular data.

Spoken like a true oldie I suspect

Login to post a reply

Server time is: 2024-11-18 00:51:56
Your offset time is: 2024-11-18 00:51:56