Give help. Get help.

  • # August 4, 2009 at 5:55 am

    Hi there!

    My website contains two types of pages: Besides that normal ones that are long and scrollable, I have have those short ones whose content fits into a standard sized window. I use two navigations on these pages, one in the top-right corner and the other one in the bottom-left corner, so I have to give the < html >-element:

    html { overflow: hidden; height: 100%; }

    in order to get rid of the scrollbars and to avoid shivering of divs positioned at the bottom or right edge. The top-left one would shiver and flicker when hovering over the bottom-right one, because the vertical scrollbar is displayed for the time of hovering. This does not work, when the above attributes refer to the body-element, and I cannot use the great technique of giving the body an id or a class.

    My question is: Can I give the html-element an id or a class without any unforseen consequences? As far as I know, the < html >-element is the Eva of all elements in the DOM and the body element is her first child. My htmls look like this


    and it would look like this


    Is there anything that the html-element is sacrosanct for ids and classes?

    Thanks! Runa

    # August 4, 2009 at 7:54 pm

    Thanks! I made a page and a css-file today. It works fine in the browsers.They treat it like a normal element. But the w3c-validator tells me, id’s would not be allowed on the html-element in XHTML 1.0 Strict.

    On one hand: You can solve it by splitting the css-file in two files.

    On the other hand: If the browsers and the googlebot won’t complain, why not giving it a try. I also use unallowed tags in the title-attribute for tooltipping, eg the BR or complete ULs.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.