By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,492 Members | 1,987 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,492 IT Pros & Developers. It's quick & easy.

Misc. questions

P: n/a
Hi there,

I'm migrating my pages towards XHTML 1.1 and have run into some
trouble. For example, I can't figure out how to translate these
into classes:

<table cellpadding="5" align="center" width="80%" border="0">

<td witdh="5%">

Also, I'm not sure what a class for the blue color would look like
here:

<p>not <font color="blue">blue</font></p>

It's a <span> tag I would need, right? How would I define this in the
CSS?

And what about classes for

<hr size="2" noshade="noshade" />

and

<img ... border="0" />

?

Thanks!

-Andre
Jul 20 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Andre Berger <an**********@web.de> wrote:
I'm migrating my pages towards XHTML 1.1
Rather pointless as MSIE is incapable of displaying proper XHTML 1.1
and have run into some trouble. For example, I can't figure out how
to translate these into classes:
What does using classes have to do with XHTML 1.1? The precise same
problem exists regardless of which version of (X)HTML you are using.
<table cellpadding="5" align="center" width="80%" border="0">
table.yourClassName {
margin-left: auto; margin-right: auto; /* same effect as
align="center" but only works in IE if it's IE6 in standards mode */
width: 80%;
border: none;
}

table.yourClassName td, table.yourClassName th {
padding: 5px;
}
<td witdh="5%">
td.yourOtherClassName {
width: 5%;
}
Also, I'm not sure what a class for the blue color would look like
here:

<p>not <font color="blue">blue</font></p>

It's a <span> tag I would need, right? How would I define this in the
CSS?
It may be a span element. But the question you need to ask is _why_ is
the text blue? Is it some form of emphasis? In which case <em> is the
correct element to use.

em {
font-style: normal
color: #0000FF;
background-color: #FFFFFF;
}
And what about classes for

<hr size="2" noshade="noshade" />
Slightly trickier, <hr> is an odd element at the best of times. The
easiest solution is to specify a 2px wide top or bottom border on some
adjacent element.

whatever {
border-top: 2px solid #000000;
}

One belt and braces method is as follows:

<div class="hr"><hr /><div>

div.hr {margin: 0; padding: 0; border-top-width: 2px; border-style:
solid; border-color: #000000; border-right-width: 0;
border-bottom-width: 0; border-left-width: 0;}
hr { display: none;}

Which works well with most browser bugs (if you don't care about NN4
you can use the border-top shorthand instead of specifying all the
border properties individually) and degrades to a plain <hr> when CSS
isn't available.

Generally almost everyone has their own method of styling <hr>s.
and

<img ... border="0" />


img {
border-width: 0;
}

cheers,
Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2

P: n/a
On Wed, 07 Apr 2004 09:50:07 +0100, Steve Pugh <st***@pugh.net> wrote:
Andre Berger <an**********@web.de> wrote:
I'm migrating my pages towards XHTML 1.1


Rather pointless as MSIE is incapable of displaying proper XHTML 1.1


Yes. People who, for some reason, want to switch to XHTML syntax instead
of HTML syntax for producing web pages, are IMHO best of using XHTML 1.0
Strict.

...

--
Rijk van Geijtenbeek

The Web is a procrastination apparatus:
It can absorb as much time as is required to ensure that you
won't get any real work done. - J.Nielsen
Jul 20 '05 #3

P: n/a
On Wed, 7 Apr 2004, Steve Pugh wrote:
Andre Berger <an**********@web.de> wrote:
I'm migrating my pages towards XHTML 1.1


Rather pointless as MSIE is incapable of displaying proper XHTML 1.1


More exactly "is incapable of rendering XHTML 1.1" - if MSIE can
render it, then it isn't XHTML 1.1(tm). The compatibility guidelines
of XHTML/1.0 Appendix C (in so far as they can be followed at all,
since there are some mutual contradictions) are applicable only to
XHTML/1.0, not to anything later. And, as has been said so many times
before, in practical WWW terms, XHTML/1.0 brings no benefits and some
disadvantages, relative to a "normalised" usage of HTML/4.01.

(Oh, I told MS to use a helper application for opening XHTML
content-types, leaving IE to deal with the text/html content-type for
itself. I defined the helper application to be Mozilla. That works,
and in a sense IE is "displaying" XHTML - but Mozilla is doing the
actual rendering ;-)
Jul 20 '05 #4

P: n/a
On Wed, 07 Apr 2004 11:50:06 +0200, "Rijk van Geijtenbeek"
<ri**@opera.com> wrote:
On Wed, 07 Apr 2004 09:50:07 +0100, Steve Pugh <st***@pugh.net> wrote:
Andre Berger <an**********@web.de> wrote:
I'm migrating my pages towards XHTML 1.1


Rather pointless as MSIE is incapable of displaying proper XHTML 1.1


Yes. People who, for some reason, want to switch to XHTML syntax instead
of HTML syntax for producing web pages, are IMHO best of using XHTML 1.0
Strict.


but it can't display that either, unless you're prepared to agree to
the nonsense that is Appendix C.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #5

P: n/a
On Wed, 07 Apr 2004 11:50:06 +0200, "Rijk van Geijtenbeek"
<ri**@opera.com> wrote:
On Wed, 07 Apr 2004 09:50:07 +0100, Steve Pugh <st***@pugh.net> wrote:
Andre Berger <an**********@web.de> wrote:
I'm migrating my pages towards XHTML 1.1


Rather pointless as MSIE is incapable of displaying proper XHTML 1.1


Yes. People who, for some reason, want to switch to XHTML syntax instead
of HTML syntax for producing web pages, are IMHO best of using XHTML 1.0
Strict.


but it can't display that either, unless you're prepared to agree to
the nonsense that is Appendix C.

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.