Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1812
  • Last Modified:

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

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
jumpstart0321
Asked:
jumpstart0321
  • 5
  • 2
1 Solution
 
scrathcyboyCommented:
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
 
jumpstart0321Author Commented:
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
 
jumpstart0321Author Commented:
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jumpstart0321Author Commented:
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
 
Roger BaklundCommented:
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
 
jumpstart0321Author Commented:
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
 
scrathcyboyCommented:
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
 
jumpstart0321Author Commented:
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now