Web Hosting, Design, & Coding forum

General discussion

strict DTD vs border=0 attribute

by marcelomdsc / July 27, 2007 2:30 PM PDT

hello, I just changed the dtd in all my pages to strict, and the only thing i couldnt get around was that the w3c's validator says border=0 (for an image) is not valid within a strict dtd document, so how could i get around this?

keep the strict dtd and have no borders around my pictures?

thanks, Marcelo.

Discussion is locked
You are posting a reply to: strict DTD vs border=0 attribute
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: strict DTD vs border=0 attribute
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
by MarkFlax Forum moderator / July 28, 2007 7:40 PM PDT

I have no knowledge of XHTML yet but looking into your problem it seems that, unless a border needs to be specified, then you leave the border attribute out.

This is an example I found and it suggests that border is no longer just border="1", etc. Instead it is a style, included in style sheets if the attribute is to be global, otherwise specified in pixels and a color, eg;

<img id="img1" src="image1.gif" style="border: 5px solid green;" width="100"
height="100" alt="border test">

Does that help?


Collapse -
of course
by marcelomdsc / July 29, 2007 3:44 AM PDT
In reply to: Yes.

yes what I'll do is just put this code in my style sheet
img {
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;

and that will apply to all the images, and if I want one to have a border I'll create a class.


Collapse -
(NT) Yep that looks good.
by MarkFlax Forum moderator / July 29, 2007 4:11 AM PDT
In reply to: of course
Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?