Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > strict xhtml and css

Reply
Thread Tools

strict xhtml and css

 
 
MWSunshine
Guest
Posts: n/a
 
      07-06-2004
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


 
Reply With Quote
 
 
 
 
brucie
Guest
Posts: n/a
 
      07-06-2004
in post: <news:ccdfgb$l8j$(E-Mail Removed)>
MWSunshine <(E-Mail Removed)> 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-...nu-thingy.html


--
b r u c i e


 
Reply With Quote
 
 
 
 
MWSunshine
Guest
Posts: n/a
 
      07-06-2004
> http://www.brucie.name/usenetshit/3-...nu-thingy.html


Thank You very much!
I can see it's so easy, but I am just beginning with this stuff. Actually -
it will be my first page ever made in text editor.

Again: Thanks a lot !
MWSunshine


 
Reply With Quote
 
Nick Howes
Guest
Posts: n/a
 
      07-06-2004
"brucie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> in post: <news:ccdfgb$l8j$(E-Mail Removed)>
> MWSunshine <(E-Mail Removed)> 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-...nu-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


 
Reply With Quote
 
Webcastmaker
Guest
Posts: n/a
 
      07-06-2004
In article <ccdfgb$l8j$(E-Mail Removed)>,
http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
Andy Dingley
Guest
Posts: n/a
 
      07-06-2004
"MWSunshine" <(E-Mail Removed)> wrote in message news:<ccdfgb$l8j$(E-Mail Removed)>...

> 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.
 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      07-06-2004
in post: <news:(E-Mail Removed). com>
Andy Dingley <(E-Mail Removed)> 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


 
Reply With Quote
 
Ryan Stewart
Guest
Posts: n/a
 
      07-06-2004
"brucie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> in post: <news:(E-Mail Removed). com>
> Andy Dingley <(E-Mail Removed)> 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?


 
Reply With Quote
 
brucie
Guest
Posts: n/a
 
      07-06-2004
in post: <news(E-Mail Removed)>
Ryan Stewart <(E-Mail Removed)> 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


 
Reply With Quote
 
MWSunshine
Guest
Posts: n/a
 
      07-06-2004
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PSD to XHTML Conversion, PSD to HTML, Joomla, Drupal, WordpressConversion, PSD to XHTML CSS xhtml champs XML 0 08-02-2011 05:40 AM
PSD to XHTML Conversion, PSD to HTML, Joomla, Drupal, WordpressConversion, PSD to XHTML CSS xhtml champs C Programming 0 08-01-2011 06:29 AM
A CSS/XHTML Strict questions for centering an object Jeremy Brown HTML 2 05-15-2006 04:37 AM
img alignment in xhtml strict and css Kelwin Delaunay HTML 4 04-17-2004 05:41 PM
XHTML Strict and Script Tom HTML 6 11-15-2003 07:12 PM



Advertisments