Jump to content

Html Validation Issue


garyk

Recommended Posts

Hi, I am validating my HTML with w3c, its outputting an error;Attribute "background" exists, but can not be used for this element. <table background="../images/stories/main_ad_bg.png" width="800" height="255" >What would the error within the brackets be?...

Link to comment
Share on other sites

Hi, I am validating my HTML with w3c, its outputting an error;Attribute "background" exists, but can not be used for this element. <table background="../images/stories/main_ad_bg.png" width="800" height="255" >What would the error within the brackets be?...
Try updating your link so it doesn't have the ../
Link to comment
Share on other sites

Ok so now I realize the plot thickening. I am working within a module in Joomla. I am unable to link to a css from within the module nor can I add css within the head coz if I pull in full html into the module it shall call up further errors on validation...

Link to comment
Share on other sites

is this a new module you have created, or a already predefined module?you can give modules you have created a class 'Module Class Suffix' which will give you more control to add your specific css formatting to.you are trying to control the table background within a module itself, or a table within the index page? where the module positions are defined.

Link to comment
Share on other sites

I am creating a template for the designers to follow when developing promotions. Once I have removed the validating issues for the homepage I can send it to them. The module is a mod_php which I created and positioned on the homepage index, this module will be updated often with new promotions etc. Strange thing was I played around with the following code and managed to successfully validate the CSS... for about 5mins before it reverted back to the errors again..most confusing..<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><!--<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->language; ?>" lang="<?php echo $this->language; ?>" dir="<?php echo $this->direction; ?>" >-->

Link to comment
Share on other sites

If you are familiar with Joomla, wouldnt you think it would be virtually impossible to validate your HTML with all the different extensions one can use? I think I may have opened a can O worms trying to validate the HTML of a Joomla site...

Link to comment
Share on other sites

it's true!, in some cases there is no way to validate your joomla site because of extension's that break the validation rules (usually when transparency is involved).but in your case, its just a table, which broke the rule of using old method of 'background=' to insert a background image,if you used style="background-image:url(../images/stories/main_ad_bg.png);" it would probably validate, but you should use a class, or id to reference this table, to assign the background.Edit: this is why the height within the table also failed, but if where to add this to the style=".....", again, this would then validate.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...