Solved

W3C validation there is no attribute "border" on imagebuttons.

Posted on 2008-10-24
8
1,789 Views
Last Modified: 2013-11-19
Ok, I really need help, I've been banging my head against the wall over this for hours.
I can't get my pages to validate.
here's 2 samples:
http://beta.webspider.com
and
http://beta.webspider.com/10-Karat-Yellow-Gold-Aquarius-Zodiac-Pendant_3884339.html
both say that there is no attribute "border".
although during run time on my web server there seems to be a "border" attribute popping up for these 2 image buttons, I assure you there is no such attribute set in my code. I've even deleted all the stylesheets to make sure they weren't interferring. I have no idea where this border attribute is or why it's popping in, can somebody please help? I've been working on this for 4 hours now :( Thanks, Chris.
0
Comment
Question by:jumpstart0321
  • 5
  • 2
8 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
Comment Utility
Actually, you can solve the problem by specifying a border --

Button.image  { padding:0px; margin:0px; border:0px }

If you give your button the class of "image", this should remove the errors.  yes?  no?

On another point -- you can't be serious about using that page background for that site, can you?  I mean it makes the whole page text unreadable.  Not trying to be critical, but it is going to alienate almost everyone.  I assume this is just for testing?   Whatever you do, get the background image to where it doesn't kill the text.
0
 

Author Comment

by:jumpstart0321
Comment Utility
Still a no go. Ok, here is what I've put in:
<head>
<style type="text/css">
        button.image  { padding:0px; margin:0px; border:0px }
        </style>
</head>
and
<body>
<asp:ImageButton ID="btnSearchItem" runat="server" ImageUrl="~/images/search_btn.jpg" class="image"/>
</body>
As far as the background. I just read a marketing article on branding and I guess I took it a little overboard. I've taken the opacity down 50%. It looks a lot better now. Any more ideas?
0
 

Author Comment

by:jumpstart0321
Comment Utility
One other thing I might mention that's odd. If I view it live in my home browser, then copy and paste the source into w3c, it validates. But, when posting it to my live server, the source does not validate. I've included the validation on the home page so all you have to do is click on it. The icon is in the top right hand corner.
0
 

Author Comment

by:jumpstart0321
Comment Utility
Ok, well this is odd. Apparently you can copy and paste the source code from the pages into w3c directly and it validates. So, why would they're direct URL validation tool not validate?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
Comment Utility
There seems to be some server side browser sniffing going on... I get a different source when I telnet to fetch your page (no useragent header).

This is what firefox sees:

<input type="image"
  name="ctl00$imgInternetSearch"
  id="ctl00_imgInternetSearch"
  src="images/webspiderbuttonInternet.gif"
  style="border-width:0px;" />

... and this is what I see with telnet, apparently the same as the validator sees:

<input type="image"
  name="ctl00$imgInternetSearch"
  id="ctl00_imgInternetSearch"
  src="images/webspiderbuttonInternet.gif"
  border="0" />
0
 

Author Comment

by:jumpstart0321
Comment Utility
Ok, I've taken your advice and tried about every single solution I can think of including reverting my web.config file back to the bare bones, and disabling my URL rewrite sofware. Still nothing. Ouch, 24 hour of banging my head and still nothing.
0
 
LVL 44

Expert Comment

by:scrathcyboy
Comment Utility
why go through all that hassle because of "validation" ?  What validates or not depends on the DOCTYPE in the head.  try a different one, like --

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

instead of this --

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

If it's just for one "border" comment, forget it.  Probably 90% of pages on the net don't validate perfectly, according to some standard or other -- all of which are moving targets anyway, and will all change.
0
 

Author Comment

by:jumpstart0321
Comment Utility
SEO man, these days it means a lot when it comes to traffic. People may say it means nothing, but I have seen firsthand the difference between messy sites and cleaned up sites and it is huge. I found the solution as listed here:
http://remy.supertext.ch/2008/07/supertextch-is-valid-xhtml-10-strict/
cxr was able to target the problem, but not the solution. A good shot anyways though; this was difficult to fix.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now