|
-
May 7th, 2004, 07:43 PM
#1
Thread Starter
Frenzied Member
Help! (it's real easy)
Can somone maybe using front page make a table with one row and one cell wide.
I want a picture to be in it and the whole background to highlight when you hover your mouse over it!! real easy if you use DHTML on front page... I don't have this any more.. can someone please help
-
May 10th, 2004, 02:40 AM
#2
Fanatic Member
Here you go
Code:
<TABLE width="200" border="1" cellspacing="0" cellpadding="0">
<TR>
<TD style="width:100%; background-color:lightblue"
onMouseover="this.style.backgroundColor='yellow';"
onMouseout="this.style.backgroundColor='lightblue';">
<i>Insert Picture here</i>
</TD>
</TR>
</TABLE>
-
May 10th, 2004, 05:19 AM
#3
Frenzied Member
why have a table with only one cell? Why not use a <div> instead?
Have I helped you? Please Rate my posts. 
-
May 10th, 2004, 06:24 AM
#4
Originally posted by Acidic
why have a table with only one cell? Why not use a <div> instead?
More control for later changes.
And <DIV>s are slightly evil. Although not as evil as <SPAN>s.
-
May 10th, 2004, 06:45 AM
#5
Frenzied Member
I thinks <div>'s are not evil. <table>'s are pointless, as CB pointed out is an earlier thread. At least unless you actually want to tablulate data, eg results from a survey or something.
I use <span>'s as one line <div>'s. For when I need to alter text in JS.
Have I helped you? Please Rate my posts. 
-
May 10th, 2004, 06:52 AM
#6
<SPAN> and <DIV> are basically meaningless. Should be avoided if there is a better way to do the same thing.
If no other way, then hey, whatever floats your boat.
-
May 10th, 2004, 07:04 AM
#7
Spans and divs are what the name says: spans and divisions. They have meaning, if not much. Divs represent sections of your page (XHTML 2 will have a <section> tag to make this clearer). They divide your page into logical parts, like navigation and content, the content into subheadings, the subheadings into blocks. The div is indeed the most useful tag in HTML in a way.
Tables are what the name says too. But, unlike spans and divs, they have lots of meaning. They mean data, organized by rows and columns. They don't mean layout. If they did, they'd be called grids, not tables.
Tables don't give you more control for later changes either. In fact, they take away control. Using divs, you can just change the CSS that affects them. Using tables, you have to change the table, i.e. the HTML code.
Tables for layout are evil. Tables for tabular data are not.
Divs just for layout are slightly evil, though sometimes there's no choice. Divs for dividing something into sections are perfectly valid and make good sense. I use them all the time for it.
Use Mozilla and go to my homepage:
http://stud3.tuwien.ac.at/~e0226430/base.xhtml
(IE won't load it anyway).
Look at the source code. Notice how lean the source is? Not a single table.
Then go to View->Use Style and try out the various styles, especially Mozilla Heaven and Parchment as opposed to Standard or Yellow/Gray. Completely different look, same code. No way you could ever do that with tables.
And yet, not a single span or div that doesn't make sense.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 10th, 2004, 08:02 AM
#8
Frenzied Member
congrats... you've just created a website that rules out half the browsing community. While I'm impressed with the style capablities, I can't get past the lack of browser cross-compatibility.
-
May 10th, 2004, 08:10 AM
#9
Frenzied Member
Actually it rules out more than 1/2. On the other hand, the site is standards compliant, therefore it is the browsers fault if the people can't visit the site.
I do try making my site work in all browsers, but sometimes I just want to forget IE and make it work in all real browsers.
I'm sure I've read a thread like this before, people asking CB why he doesn't make his site work in IE.
/me going to have a look what the site looks like in IE.
Edit: hehe, it tried to download the .xhtml file. That's why I only ever use IE to see what my pages look like in it,
Have I helped you? Please Rate my posts. 
-
May 10th, 2004, 08:43 AM
#10
Fanatic Member
It might be the browsers fault and it might not be a real browser but if if your trying to make money of the web then you have to make sure people can see your site.
It creates a bad impression if your site wont load in IE, whereas if you coded it for IE a few geeks might whinge about it not being standard HTML.
-
May 10th, 2004, 10:13 AM
#11
CornedBee:
Some of the webapps we make here contain complex nested forms. I'd definitely like to see how this can be done using just <DIV>s and <SPAN>s without hassle.
Of course, given time, anything can be done with those tags, I agree, but when time is of the essence, the tables come in real handy.
Then, when requirements change, and you're asked to change the layout of the forms or objects on the page, nothing works better than tables.
Oh, and when I mentioned "meaningless", I wasn't going by the literal definition.
-
May 10th, 2004, 10:15 AM
#12
Originally posted by davebat
It might be the browsers fault and it might not be a real browser but if if your trying to make money of the web then you have to make sure people can see your site.
It creates a bad impression if your site wont load in IE, whereas if you coded it for IE a few geeks might whinge about it not being standard HTML.
I'll agree with this. Most webapps I've seen have been created solely for IE, despite it's non-compliance.
-
May 10th, 2004, 10:46 AM
#13
davebat: My page is not about money. It's about making a point. As such, I really enjoy that fact that IE doesn't display it and I don't plan on changing it.
whereas if you coded it for IE a few geeks might whinge about it not being standard HTML.
I happen to be one of those geeks 
mendhak: I am writing a form-heavy web-app, using only standard HTML 4.01 Strict as it was intended (i.e. no layout tables) and it works perfectly. Can't show it in public though. I'll see if I can extract some of the code.
Then, when requirements change, and you're asked to change the layout of the forms or objects on the page, nothing works better than tables.
On the contrary, this is exactly when you're doomed with tables.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 10th, 2004, 11:24 AM
#14
Originally posted by CornedBee
On the contrary, this is exactly when you're doomed with tables.
Not very agile, are we now?
-
May 10th, 2004, 12:39 PM
#15
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 11th, 2004, 02:35 AM
#16
Fanatic Member
Originally posted by CornedBee
davebat: My page is not about money. It's about making a point. As such, I really enjoy that fact that IE doesn't display it and I don't plan on changing it.
Isnt the heart of the internet about sharing information?
-
May 11th, 2004, 03:20 AM
#17
Tell that Amazon and E-Bay. A lot of "sharing information" there
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
May 11th, 2004, 03:07 PM
#18
-
Jun 3rd, 2004, 09:23 AM
#19
Frenzied Member
Originally posted by davebat
Isnt the heart of the internet about sharing information?
Not according to Microsoft since their browser doesn't support the standards
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Jun 3rd, 2004, 09:29 AM
#20
Fanatic Member
Originally posted by vbNeo
Not according to Microsoft since their browser doesn't support the standards
Microsoft didn'tinvent the internet so that doesn't really have any relevance.
-
Jun 3rd, 2004, 09:34 AM
#21
Frenzied Member
Originally posted by davebat
Microsoft didn'tinvent the internet so that doesn't really have any relevance.
No, but what they did invent is the worlds most used and most crappy browser that ships with the worlds most crappy operating system. If they had done their job probably, MoZilla wouldn't even have a cause.
[Edit] Damn spelling mistakes [/Edit]
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Jun 3rd, 2004, 09:42 AM
#22
Fanatic Member
Originally posted by vbNeo
No, but what they did invent is the worlds most used and most crappy browser that ships with the worlds most crappy operating system. If they had done their job probably, MoZilla wouldn't even have a cause.
They did their job properly by creating the worlds most used browser. As a company they exist to make money and they are very good at that.
-
Jun 3rd, 2004, 10:15 AM
#23
Frenzied Member
Originally posted by davebat
They did their job properly by creating the worlds most used browser. As a company they exist to make money and they are very good at that.
They did a good job as materialistic bastards, but they, as usual, spit on the user.
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|