473,786 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing doctype affects border and background

I'm trying to get my head around a problem that has me baffled.

The following element:

#wrapper {border:1px solid #000;background :#fff;}
Renders as expected when using this DTD:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
But when switching to this DTD:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
Neither the outline or background colour is rendered.

What am I missing?
Jul 21 '05
34 4442
The Good Son wrote:
Thanks for the replies.

It's a requirement of the CMS we are using that our templates conform to
XHTML 1.0 strict.

Funny thing is, whilst the stylesheet entry is being ignored, I can add the
attributes to the element within the template and it adds the border and
background colour.


Here is a W3C test case of an XHTML 1.0 Strict document demonstrating,
among other things, the use of border and background-color.

http://www.w3.org/QA/2004/02/object/test-case-008

--
Gus
Jul 21 '05 #11
Thanks for the link, but it doesn't help much.

The problem I have is one of specific entries in the stylesheet being
completely ignored. If I take those entries and add them directly to the
element in the page template the page renders correctly in the browser
window.
Jul 21 '05 #12

"Lauri Raittila" <la***@raittila .cjb.net> wrote in message
news:MP******** *************** *@news.individu al.net...
in comp.infosystem s.www.authoring.stylesheets, Tony Marston wrote:

"Justin Lieb" <ju************ **@adelphia.net > wrote in message
> XHTML is basically pointless at this point in time, unless they
> want to use xml tools with it.


Actually, people that use xml tools often say that is is easier to output
html than appendix C conforming xhtml...
I disagree. My PHP web application has output XHTML for over two years,
and
renders in IE, Opera and Firefox. The differences between "proper" HTML
and
XHTML are minor.


And point of using xhtml is? You could just fine use plain html4, right?


Because I can. I could use plain old HTML, but that is so-o-o-o-o last
century. One must keep up with the current standards, mustn't one?

--
Tony Marston

http://www.tonymarston.net

Jul 21 '05 #13
The Good Son wrote:
Thanks for the link, but it doesn't help much.

The problem I have is one of specific entries in the stylesheet being
completely ignored. If I take those entries and add them directly to the
element in the page template the page renders correctly in the browser
window.


You provide a selector with declaration and you say that it does not work.
I give you an example where it does work.
You say that it does not help much - it still does not work.
Do you see anything at all odd in this scenario?

The link proves that it works, therefore there is something amiss in
your document and you should be able to troubleshoot it. If you're
looking for someone to do it for you, then you haven't provided enough
information.

--
Gus
Jul 21 '05 #14
Tony Marston wrote:
"Lauri Raittila" <la***@raittila .cjb.net> wrote in message
news:MP******** *************** *@news.individu al.net...
in comp.infosystem s.www.authoring.stylesheets, Tony Marston wrote:
"Justin Lieb" <ju************ **@adelphia.net > wrote in message

XHTML is basically pointless at this point in time, unless they
want to use xml tools with it.


Actually, people that use xml tools often say that is is easier to output
html than appendix C conforming xhtml...

I disagree. My PHP web application has output XHTML for over two years,
and
renders in IE, Opera and Firefox. The differences between "proper" HTML
and
XHTML are minor.


And point of using xhtml is? You could just fine use plain html4, right?

Because I can. I could use plain old HTML, but that is so-o-o-o-o last
century. One must keep up with the current standards, mustn't one?


Of course you can, but serious web developers will use what
works properly with current browsers! Remember browser will
treat what you claim is valid XHTML as tag soup or HTML 3.2
if you will.

JL
Jul 21 '05 #15
On Thu, 9 Jun 2005, Tony Marston wrote:
"Lauri Raittila" <la***@raittila .cjb.net> wrote in message

And point of using xhtml is? You could just fine use plain html4, right?


Because I can. I could use plain old HTML, but that is so-o-o-o-o last
century. One must keep up with the current standards, mustn't one?


That rather depends on whether you're trying to communicate your
content to the web, or to make a fashion statement.

Statistically, like it or not (personally I don't like it, but it's
reality nevertheless), the majority of users are browsing with a
browser-like object from the last century that doesn't even conform to
mandatory IETF interworking rules, let alone the W3C ones.

Let me put it this way. You might have your own good reasons for
emitting XHTML, but you don't seem to have actually revealed them here
yet. That it is feasible (relying on a widespread browser bug
relative to SGML) to feed XHTML to browsers which were designed for
HTML, using the provisions of Appendix C, is not contentious: we all
know about it. It's just that some draw different conclusions from
that observation.
Jul 21 '05 #16
in comp.infosystem s.www.authoring.stylesheets, Tony Marston wrote:
And point of using xhtml is? You could just fine use plain html4, right?
Because I can.


I would say that it is not very good argument. So it is pointless, at
least you find one reason (point), why it would be better.
I could use plain old HTML, but that is so-o-o-o-o last
century. One must keep up with the current standards, mustn't one?


I am almost 100% sure that valid XHTML strict will never be as well
supported as HTML4 strict. If done like appendix C, support is not
currently much worse, but Appendix C is non normative, and thus not
standard. Anyway, if you would use current standard, that would be
XHTNL1.1, which don't work in IE.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #17
Lauri Raittila wrote:
in comp.infosystem s.www.authoring.stylesheets, Tony Marston wrote:

And point of using xhtml is? You could just fine use plain html4, right?
Because I can.

I would say that it is not very good argument. So it is pointless, at
least you find one reason (point), why it would be better.

I could use plain old HTML, but that is so-o-o-o-o last
century. One must keep up with the current standards, mustn't one?

I am almost 100% sure that valid XHTML strict will never be as well
supported as HTML4 strict.


I am 100% certain that is true for legacy browsers, although somewhat of
an odd statement since XHTML incorporates HTML 4.
If done like appendix C, support is not
currently much worse, but Appendix C is non normative, and thus not
standard.
Appendix C is used to support non-standard legacy browsers.
Anyway, if you would use current standard, that would be
XHTNL1.1, which don't work in IE.


This site, served as text/html, does not work on your IE?
http://www.w3.org/TR/xhtml11/
Please expand on what does not work.

--
Gus
Jul 21 '05 #18
in comp.infosystem s.www.authoring.stylesheets, Gus Richter wrote:
Lauri Raittila wrote:
in comp.infosystem s.www.authoring.stylesheets, Tony Marston wrote:

And point of using xhtml is? You could just fine use plain html4, right?

Because I can.

I would say that it is not very good argument. So it is pointless, at
least you find one reason (point), why it would be better.

I could use plain old HTML, but that is so-o-o-o-o last
century. One must keep up with the current standards, mustn't one?

I am almost 100% sure that valid XHTML strict will never be as well
supported as HTML4 strict.


I am 100% certain that is true for legacy browsers although somewhat of
an odd statement since XHTML incorporates HTML 4.


There are differences. Just enough to make browsers have problems, but
not enough to actually give any benefits...
If done like appendix C, support is not
currently much worse, but Appendix C is non normative, and thus not
standard.


Appendix C is used to support non-standard legacy browsers.


Yes. Remembering that legasy browsers is also IE6, which is 80% of
current browsers
Anyway, if you would use current standard, that would be
XHTNL1.1, which don't work in IE.


N->M of course
This site, served as text/html, does not work on your IE?
http://www.w3.org/TR/xhtml11/
Please expand on what does not work.


It is supposed to be served in text/xhtml+xml. You can serve it using
text/html, it is bad thing to do, but you can. But that won't mean
XHTML1.1 works in IE, done as it should be done. Just as IE doesn't
support XHTML1.0 either, unless appendix C is followed. So, IE clearly
don't support XHTML - you can't just make correct xhtml document and
think that it works in IE.

But if you make document following the spec, you find out that IE won't
support it. And that it don't work.

And that document you refer gets quirks mode in IE...

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #19
> You provide a selector with declaration and you say that it does not
work. I give you an example where it does work.
You say that it does not help much - it still does not work.
I have plenty of examples, formatted in the same way, within the original
stylesheet that do work.

Do you see anything at all odd in this scenario?
Yes, you don't seem to be with me. I'm trying to understand why the change
in doctype would cause this problem.

The link proves that it works, therefore there is something amiss in
your document and you should be able to troubleshoot it.


If I switch the doctype back, it works. I want to understand why it is just
these two declarations that are ignored by the new doctype.
Jul 21 '05 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
2547
by: Robert Misiorowski | last post by:
Hello, I have a very perplexing (at least to me) problem that hopefully someone can help me with. I'm making a site with a 3 column layout. In the middle column (my fluid column) I am trying to put a table of 99% width. When I do this the table actually extends to the right over my right column and off the screen. After much debugging and trying of different things, I change this line in my code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD...
6
5168
by: Patrick | last post by:
Hi I am fairly new to CSS and the web.I am trying to build a site more to practice my skills than for the site itself. I have been focusing on CSS and try my best to make it work in I.E 6.0, Opera 7.23, Mozilla 1.4 and N.N. 7.1. My site was doing fine until i read i was supposed to keep everything validated so i entered a strict html 4.01 doctype with url following.My HTML validated fine. So i validated my CSS and beside a little...
2
1744
by: Dominic Myers | last post by:
Hi there, wondered if someone could point me to an appropriate tutorial or offer advice on the following problem? I've got a web page which uses lots of divs to position the content of the page and I'm using a nice javascript to alter the css of a table of links. The thing is I don't want the table of links to point to an external site but to calla function which will replace the content of a layer... perhaps it's be better if I...
31
5725
by: Arthur Shapiro | last post by:
I'm the webmaster for a recreational organization. As part of one page of the site, I have an HTML "Calendar at a Glance" of the organization's events for the month. It's a simple table of a calendar, 7 across by whatever needed down, and I manually create it each month - not a big deal. Every day I go in and darken the background color of the current day's cell by changing the appropriate <TD> entry to <TD bgcolor="c63800"> and...
31
4158
by: Greg Scharlemann | last post by:
Given some recent success on a simple form validation (mainly due to the kind folks in this forum), I've tried to tackle something a bit more difficult. I'm pulling data down from a database and populating a simple table. I'd like the table to contain 10 entries per page and have the option for the user to scroll through the pages of data without having to go back to refresh the page (I've already pulled all the info I need from the...
8
3929
by: Bosconian | last post by:
I have two multiple select inputs. Initially the first contains a bunch of items and the second is empty. Using a common method, I move items back and forth by double clicking on them. This portion works perfectly, but I would also like to change the background color of the select element with the current focus. I have defined the following classes: ..selected {
13
3030
by: amykimber | last post by:
Hi all, I know I'm doign something really daft, but I can't get this to work... I have a form with a bunch of inputs called ship_owner - why the ? Because I'm submitting this page though php and the put the data into an array in the post.... anywhat. I have a link <a href="javascript:change_class()" >Block mode</a> to
0
3213
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I have a web form, and I want to use ModalPopupExtender from Ajax Toolkit. I am using IE 7.0 as browser, VS 2005 and Ajax and Ajax Tool Kit installed. Windows XP Pro. Now I have a very strange problem. With 2nd line of code (DOCTYPE), I can popup modal dialog in middle of screen, BUT all my styles are lost, including modal popup is ugly. If I remove DOCTYPE I can see all my styles, BUT modal
17
4385
by: seajay | last post by:
Hello, I noticed something strange when I was composing a XHTML document with CSS The following DOCTYPE causes the page to display differently on Fireflox 1.0.6 and Internet Explorer 6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
0
9496
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8989
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4066
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3669
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.