Results 1 to 23 of 23

Thread: Help! (it's real easy)

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2003
    Location
    Auckland
    Posts
    1,139

    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

  2. #2
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    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>

  3. #3
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    why have a table with only one cell? Why not use a <div> instead?
    Have I helped you? Please Rate my posts.

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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.

  5. #5
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.

  6. #6
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    <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.

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  8. #8
    Frenzied Member ober0330's Avatar
    Join Date
    Dec 2001
    Location
    OH, USA
    Posts
    1,945
    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.
    format your code!! - [vbcode] [/vbcode]

    ANSWERS CAN BE FOUND HERE!!

    my personal company

  9. #9
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    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.

  10. #10
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    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.

  11. #11
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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.

  12. #12
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    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.

  13. #13
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  14. #14
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Originally posted by CornedBee

    On the contrary, this is exactly when you're doomed with tables.
    Not very agile, are we now?

  15. #15
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Huh?
    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.

  16. #16
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    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?

  17. #17
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    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.

  18. #18
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

  19. #19
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    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.

  20. #20
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    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.

  21. #21
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    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.

  22. #22
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    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.

  23. #23
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    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
  •  



Click Here to Expand Forum to Full Width