473,387 Members | 1,303 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

XHTML strict DTD questions

Hello,
It is my understanding that you cannot use the element "align" in a strict DTD XHTML page. This is not working for me: float: center
which I thought was the correct way to do it. Any ideas??

Also, I have about 8 separate headings that all have the following attributes:
color:green; font-family:sans-serif; font-weight:bold
How would I code these all at once using a style sheet in the head? What would the coding be in the body section? Would I use the span element??

Thank you in advance.
Decorte
Sep 17 '06 #1
7 1774
Sorry, when I said that I have 8 separate headings I meant to say that I have 8
separate items that are within the <dt> tags.
Thanks again,
Decorte
Sep 17 '06 #2
Banfa
9,065 Expert Mod 8TB
center is not an valid value for float, if you want something in the center just center it either using text-align: center; on it's parent if it is an inline element or setting left and right margins to auto (and a width) if it is a block element.

To set the styling color:green; font-family:sans-serif; font-weight:bold on multiple elemnts just create a class

[html]
.someMeaningfulName {
color:green;
font-family:sans-serif;
font-weight:bold ;
}

...

<dt class="someMeaningfulName">Blah Blah Blah</dt>
[/html]

Another alternitive that takes less typing is to set a class or id on a parent element

[html]
#SomeMeaningfulName dt {
color:green;
font-family:sans-serif;
font-weight:bold ;
}

...

<dl id="SomeMeaninfulName">
<dt>This element gets the green etc styling</dt>
</dl>
[/html]

This is handy way to keep the html fairly clean from extra class attributes but still control your presentation.
Sep 17 '06 #3
Thank you very much Banfa I'll give your suggestions a whirl.
I greatly appreciate your advice!
Decorte
P.S. - I find this "Strict stuff a bit confusing at times"
Sep 18 '06 #4
drhowarddrfine
7,435 Expert 4TB
There is nothing confusing about 'this strict stuff'. Strict only means you have to follow the current rules and you can't use the old tags.
Sep 18 '06 #5
To me "Strict" is a bit confusing considering that I just took a whole course on HTML (8 weeks worth). I also did one week of XHTML and one week of CSS.
So.........when the strict came in during the XHTML portion of my course it kind of through me off.
Decorte
P.S. - I knew nothing about web page designing before I took this course!
Sep 18 '06 #6
drhowarddrfine
7,435 Expert 4TB
"Sometimes you have to run as fast as you can just to stay where you are." --The Queen of Hearts, Alice in Wonderland.
Sep 18 '06 #7
You got that right!!
Thanks again,
Decorte
Sep 18 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

24
by: Nobody | last post by:
Okay, you are all so smart in here. Answer me this: IE6 in standards mode doesn't seem to hide scrollbars on the body element (overflow:hide) Ain't this a quandary. I have it in my head that I...
35
by: The Bicycling Guitarist | last post by:
My web site has not been spidered by Googlebot since April 2003. The site in question is at www.TheBicyclingGuitarist.net/ I received much help from this NG and the stylesheets NG when updating the...
16
by: Peter Maas | last post by:
The XHTML file below creates a 2x2 matrix of square images. There is always some space at the bottom borders of the cells (when rendered with Gecko and KHTML, not with IE) and I've found no way so...
17
by: ccdrbrg | last post by:
This is a rather general subject, I apologize. I am new to XHTML, CSS, et al and I am having trouble understanding the DTD and xml namespace declarations. For example: <!DOCTYPE html PUBLIC...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
5
by: Viken Karaguesian | last post by:
Hello everyone, I have a question about the XHTML doctype. I often times see this statement included in the <html> tag: <html xmlns="http://www.w3.org/1999/xhtml"> If I use the full...
9
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a...
24
by: Dan Jacobson | last post by:
I shall jump on the XHTML bandwagon. I run my perfectly good html4/strict pages thru $ tidy -asxhtml -utf8 #to get: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"...
4
by: stephen.cunliffe | last post by:
Hi all, There's been a bunch of chatter recently about using the Object tag, vs. the Iframe tag. I couldn't care less which one is used, I just want to be able to load a "page" inside another...
5
by: howa | last post by:
Besides 1. matter of taste 2. XHTML content-type issue, i.e. trigger IE quirk mode if send using the correct xml content type Are there any real advantage that can differentiates these two?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.