strict xhtml and css

Discussion in 'HTML' started by MWSunshine, Jul 6, 2004.

  1. MWSunshine

    MWSunshine Guest

    Hi !

    I would like to make a nice menu on my page. The menu should be located on
    the eleft side. You can see it on:
    http://www.republika.pl/mwsunshine/index3.html
    The problem is that I nested a table in DIV to have the possibility of
    highlight the menu contents when the mouse is moved over the link.
    But it seems to be not allowed in xhtml - validator is comlaining about
    table in this place.
    But if table is not allowed there - how can i achieve the same effect
    without table?

    MWSunshine
     
    MWSunshine, Jul 6, 2004
    #1
    1. Advertising

  2. MWSunshine

    brucie Guest

    brucie, Jul 6, 2004
    #2
    1. Advertising

  3. MWSunshine

    MWSunshine Guest

    MWSunshine, Jul 6, 2004
    #3
  4. MWSunshine

    Nick Howes Guest

    "brucie" <> wrote in message
    news:...
    > in post: <news:ccdfgb$l8j$>
    > MWSunshine <> said:
    >
    > > I would like to make a nice menu on my page. The menu should be located

    on
    > > the eleft side. You can see it on:
    > > http://www.republika.pl/mwsunshine/index3.html

    >
    > http://www.brucie.name/usenetshit/3-col-with-menu-thingy.html
    >
    >


    You should do as brucie as done, and take advantage of style sheets. This is
    part of the general move in HTML towards markup that represents what it is,
    rather than random tables. And menus are lists, generally, so why not write
    it out as such and then style them?

    also i think that script tag on the first line is probably invalid... would
    be better in the <head> element. unless that is added by your host
     
    Nick Howes, Jul 6, 2004
    #4
  5. MWSunshine

    Webcastmaker Guest

    In article <ccdfgb$l8j$>,
    says...
    > But if table is not allowed there - how can i achieve the same effect
    > without table?


    Drop the table, then put the links in an unordered list <ul>. Use CSS
    to change the size and color of each of the list items in the ul.
    --
    WebcastMaker
    The easiest and most affordable way to create
    Web casts, or put presentations on the Web.
    www.webentations.com
     
    Webcastmaker, Jul 6, 2004
    #5
  6. MWSunshine

    Andy Dingley Guest

    "MWSunshine" <> wrote in message news:<ccdfgb$l8j$>...

    > I would like to make a nice menu on my page. The menu should be located on
    > the eleft side. You can see it on:
    > http://www.republika.pl/mwsunshine/index3.html



    > The problem is that I nested a table in DIV to have the possibility of
    > highlight the menu contents when the mouse is moved over the link.


    You don't need to do this.

    The "CSS mouse highlight" trick relies on using the CSS :hover
    pseudo-class. This only works on the <a> element, so usually you need
    to place this inside a container element (<li> or <td>) and set the
    width of the <a> to 100% so that the varying background fills its
    container.

    There is no requirement for an extra "list level" container element
    though. You probably need to add an id or class attribute so as to
    associate the CSS with it, but you can add that to the table element
    itself just as easily.


    > But it seems to be not allowed in xhtml - validator is comlaining about
    > table in this place.


    No, the validator is complaining about lots of things, but not that.

    For one thing, you need to avoid that <script> element at the top of
    file before the doctype. If this is added by your hosting company,
    then I'm sorry but you'll never have valid mark-up.

    You also re-use the same id attribute value in many places, which
    isn't valid. Think about using a class attribute here instead, or else
    just inferrring the CSS from the parent's class or id.

    And please don't wave "Valid XHTML" buttons around when it isn't.
     
    Andy Dingley, Jul 6, 2004
    #6
  7. MWSunshine

    brucie Guest

    in post: <news:>
    Andy Dingley <> said:

    > The "CSS mouse highlight" trick relies on using the CSS :hover
    > pseudo-class. This only works on the <a> element,


    the specs don't specify which elements the :hover pseudo class can apply
    to so it can apply to all. its just some old crappy browsers only apply
    it to the <a>

    > and set the width of the <a> to 100% so that the varying background
    > fills its container.


    display:block; is all thats needed, again its just some crappy old
    browsers that require the width:100%

    --
    b r u c i e
     
    brucie, Jul 6, 2004
    #7
  8. MWSunshine

    Ryan Stewart Guest

    "brucie" <> wrote in message
    news:...
    > in post: <news:>
    > Andy Dingley <> said:
    >
    > > The "CSS mouse highlight" trick relies on using the CSS :hover
    > > pseudo-class. This only works on the <a> element,

    >
    > the specs don't specify which elements the :hover pseudo class can apply
    > to so it can apply to all. its just some old crappy browsers only apply
    > it to the <a>
    >

    There are browsers that actually support it? Which?
     
    Ryan Stewart, Jul 6, 2004
    #8
  9. MWSunshine

    brucie Guest

    in post: <news:p>
    Ryan Stewart <> said:

    >> the specs don't specify which elements the :hover pseudo class can apply
    >> to so it can apply to all. its just some old crappy browsers only apply
    >> it to the <a>


    > There are browsers that actually support it?


    yep, really and truly

    >Which?


    both opera and geckos have good support for elements other than <a>

    heres the list http://www.w3.org/TR/html401/index/elements.html
    start testing



    --
    b r u c i e
     
    brucie, Jul 6, 2004
    #9
  10. MWSunshine

    MWSunshine Guest

    > And please don't wave "Valid XHTML" buttons around when it isn't.

    I am not doing this. It was experimental before i did the things with menu.
    When I was given an information that this page is no longer valid xhtml - i
    just uploaded it in temporar place to have a possibility to show it for
    better explanation of what i did. I did no modification. In this place where
    you could see it - we could say that it is not published. Only you know that
    this page is there ... :)

    MWSunshine
     
    MWSunshine, Jul 6, 2004
    #10
  11. MWSunshine

    Mark Parnell Guest

    On Tue, 6 Jul 2004 06:48:44 -0500, Ryan Stewart <>
    declared in alt.html:

    [:hover on elements other than <a>]
    > There are browsers that actually support it? Which?


    Pretty much anything more recent than NS4, except IE.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    "Never drink rum&coke whilst reading usenet" - rf 2004
     
    Mark Parnell, Jul 6, 2004
    #11
  12. MWSunshine

    Ryan Stewart Guest

    "Mark Parnell" <> wrote in message
    news:1823otadp7qls.1pu2aa5wbe5mx$...
    > On Tue, 6 Jul 2004 06:48:44 -0500, Ryan Stewart <>
    > declared in alt.html:
    >
    > [:hover on elements other than <a>]
    > > There are browsers that actually support it? Which?

    >
    > Pretty much anything more recent than NS4, except IE.
    >

    You're right. I thought I had tested it on Mozilla and FireFox, but I had a
    CSS error. Oops :)
     
    Ryan Stewart, Jul 7, 2004
    #12
  13. MWSunshine

    Andy Dingley Guest

    On Tue, 6 Jul 2004 21:33:21 +1000, brucie <>
    wrote:

    >just some old crappy browsers only apply it to the <a>


    >again its just some crappy old browsers that require the width:100%


    So what you're saying is that you need to stick with both of these ?
     
    Andy Dingley, Jul 7, 2004
    #13
  14. MWSunshine

    brucie Guest

    in post: <news:>
    Andy Dingley <> said:

    >>just some old crappy browsers only apply it to the <a>
    >>again its just some crappy old browsers that require the width:100%


    > So what you're saying is that you need to stick with both of these ?


    no, i'm saying "some crappy old browsers" is my polite way of referring
    to the total pile of shit known as IE (although it can apply to others).
    upgrade.

    --
    b r u c i e
     
    brucie, Jul 7, 2004
    #14
  15. MWSunshine

    Andy Dingley Guest

    On Wed, 7 Jul 2004 11:08:07 +1000, brucie <>
    wrote:

    >no, i'm saying "some crappy old browsers" is my polite way of referring
    >to the total pile of shit known as IE (although it can apply to others).


    I know. But people do insist on using it.

    >upgrade.


    What ? Go round and do _all_ of my users ?
    --
    Smert' spamionam
     
    Andy Dingley, Jul 8, 2004
    #15
  16. MWSunshine

    brucie Guest

    in post: <news:>
    Andy Dingley <> said:

    >>no, i'm saying "some crappy old browsers" is my polite way of referring
    >>to the total pile of shit known as IE (although it can apply to others).


    > I know. But people do insist on using it.


    people are stupid

    >>upgrade.


    > What ? Go round and do _all_ of my users ?


    yes, every single one. if they refuse to upgrade beat them to death.


    --
    b r u c i e
     
    brucie, Jul 8, 2004
    #16
  17. MWSunshine

    Ryan Stewart Guest

    "brucie" <> wrote in message
    news:1do8d0wh8l72r$...
    > in post: <news:>
    > Andy Dingley <> said:
    > >>upgrade.

    >
    > > What ? Go round and do _all_ of my users ?

    >
    > yes, every single one. if they refuse to upgrade beat them to death.
    >

    In my dreams
     
    Ryan Stewart, Jul 8, 2004
    #17
  18. MWSunshine

    rf Guest

    "brucie" <> wrote in message
    news:1do8d0wh8l72r$...
    > in post: <news:>
    > Andy Dingley <> said:
    >
    > >>no, i'm saying "some crappy old browsers" is my polite way of referring
    > >>to the total pile of shit known as IE (although it can apply to others).

    >
    > > I know. But people do insist on using it.

    >
    > people are stupid
    >
    > >>upgrade.

    >
    > > What ? Go round and do _all_ of my users ?

    >
    > yes, every single one. if they refuse to upgrade beat them to death.


    Not a good idea. One should merely beat them to a bloody pulp so all they
    can do all day is sit in bed with a notebook looking at... web sites.

    --
    Cheers
    Richard.
     
    rf, Jul 8, 2004
    #18
  19. MWSunshine

    Webcastmaker Guest

    In article <1do8d0wh8l72r$>,
    says...
    > > I know. But people do insist on using it.

    > people are stupid


    The quality of IE (and other browsers) and the stupidity of users,
    are the only thing we can count on. Because of this, we have to
    design to those specs.
    --
    WebcastMaker
    The easiest and most affordable way to create
    Web casts, or put presentations on the Web.
    www.webentations.com
     
    Webcastmaker, Jul 8, 2004
    #19
  20. MWSunshine

    Webcastmaker Guest

    In article <Xk3Hc.83887$>,
    rf@.invalid says...
    > Not a good idea. One should merely beat them to a bloody pulp so all they
    > can do all day is sit in bed with a notebook looking at... web sites.


    We could pull a Dr Brodsky (Kubrick fans will understand that)
    --
    WebcastMaker
    The easiest and most affordable way to create
    Web casts, or put presentations on the Web.
    www.webentations.com
     
    Webcastmaker, Jul 8, 2004
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tom

    XHTML Strict and Script

    Tom, Nov 15, 2003, in forum: HTML
    Replies:
    6
    Views:
    675
    Woolly Mittens
    Nov 15, 2003
  2. Kelwin Delaunay

    img alignment in xhtml strict and css

    Kelwin Delaunay, Apr 17, 2004, in forum: HTML
    Replies:
    4
    Views:
    10,851
    Kelwin Delaunay
    Apr 17, 2004
  3. Jeremy Brown
    Replies:
    2
    Views:
    627
    ironcorona
    May 15, 2006
  4. xhtml champs
    Replies:
    0
    Views:
    541
    xhtml champs
    Aug 1, 2011
  5. xhtml champs
    Replies:
    0
    Views:
    1,056
    xhtml champs
    Aug 2, 2011
Loading...

Share This Page