...

View Full Version : Total Newbie Question about "there is no attribute "align"



Subcitizen
11-17-2008, 06:26 AM
Hi. This is my first post and thanks for checking it out. I'm currently doing a W3C html validation on my blog. I'm getting this error: "there is no attribute "align". After doing some investigation, I saw that I needed to somehow get the align attribute into my CSS. I'm so lame, I can't even do it. Can someone help me? I would totally appreciate it!! Please write it so a second grader would understand it, ok. Also, once it's in the CSS properly, is the code deleted from the page?

Here's the problematic code from my footer:


<!-- copyright notice -->
<div id="copyright">
<div align="center"><br></a></div>
</div>
</div>
</div>
</body></html>

and I think this is where I need to modify the text in my CSS:


/** copyright **/
#copyright {
position:relative;
width:900px;
display:block;
clear:both;
/** float:left; cancelled out by JM 11/16/08 **/
}

#copyright div {
color:#666666;
font-size:10px;
font-weight:normal;
display:block!important;
width:900px;
float:left;
clear:left;
margin:-10px 0 0 0;
text-align:left;
}

Thanks So Much,
Jason

_Aerospace_Eng_
11-17-2008, 06:51 AM
#copyright div {
color:#666666;
font-size:10px;
font-weight:normal;
display:block!important;
width:900px;
float:left;
clear:left;
margin:-10px 0 0 0;
text-align:center;
}
Yes get rid of the align stuff in the html.

Avril
11-17-2008, 07:10 AM
Not clear what you are trying to centre.
Divs are centred horizontally using:

margin-left: auto; margin-right:auto
Text in a div can be centred horizontally by using:

text-align: center

The CSS code can be put into a separate stylesheet in the same site file, with a .css suffix such as mycsscode.css. The .html page will link to it with the link rel tags telling the browser to refer to the .css file for formatting. A separate .css stylesheet is useful if you have several pages having the same formatting as they can be linked to the same .css stylesheet.

Again, I'm only guessing. I'm not sure what you really require.

Cheers!

Major Payne
11-18-2008, 05:42 AM
Getting "<div align="center">" flagged has a lot to do with your document type. If HTML 4.01 Transitional, then you can use all kinds of deprecated tags and bad table tags for layout of a web page. Recommend strict or higher.

"<div align="center">Is this text in the center of page?</div>" Ans. It was in my browser.

As already stated though, CSS is much, much better way to control your page's presentation. I would dump any absolute positioning if you want to try to keep your pages flexible.

Subcitizen
11-18-2008, 07:50 AM
Thanks so much for all your help! I totally appreciate it! I was able to solve that part of the validation.

I have another error, though. It's the same "there is no attribute "align" error in the W3C, but it's now in my header file.

Here's the code from my header:


</head>

<body class="waterbody">

<div align="center">
<div id="container">
<div id="containerbg">
<div id="outerleft">

Now the error was in regards to the "<div align="center">". I'm not sure how to change my CSS file so I can fix, or get rid of the "<div align="center">" in my header.

Here's my CSS code:


#container {
width:900px;
margin: 10px auto;
padding:0;
text-align:left;
}

/**hold background, it should be float:leftthat's way we can not put it in #container**/
/**entire container**/
#containerbg {
position:absolute;
width: 900px;
float:left;
/** top:100;
left:100; Cancelled out by JM 11/16/08 **/
background-color: #333300;
border-left-color: #FFFFFF;
border-left-style: solid;
border-left-width: medium;
border-top-color: #FFFFFF;
border-top-style: solid;
border-top-width: medium;
border-bottom-color: #FFFFFF;
border-bottom-width: medium;
border-color: #FFFFFF;
border-right-color: #FFFFFF;
border-right-style: solid;
border-right-width: medium;
border-bottom-style: solid;
}

#outerleft {
position:relative;
float:left;
clear:left;
width:730px;

Wow. Thanks again for all your help!

Jason

_Aerospace_Eng_
11-18-2008, 08:43 AM
Just get rid of that div. Its not doing anything.

Subcitizen
11-18-2008, 07:41 PM
Thanks so much, _Aerospace_Eng_!!!!! You Rock!!!!!!


Jason

Subcitizen
11-18-2008, 09:22 PM
Here's a weird one.


document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag .

<p>Hey, Anyone out there want to be seen by thousands of people worldwide? We

I can't find the text "Hey, Anyone...". I wrote it using WP, so the text is not on any of my php pages. So I don't know what they're referring to.

How do I access that info?

Thanks, Jason

_Aerospace_Eng_
11-18-2008, 11:46 PM
Stop giving us snippets of code and give us a link to your site. BTW the validator tells you EXACTLY what the problem is. Post a link to your site please.

Subcitizen
11-19-2008, 01:32 AM
Oh sorry. Here it is:

http://www.subcitizen.com/blog/

Thanks so much!!!

Jason

_Aerospace_Eng_
11-19-2008, 06:16 AM
There are a lot more errors but this one is because you have a paragraph in a paragraph. Go to your admin area and edit the paragraph. This is that part of the code by the way.

<p>

<p>Hey, Anyone out there want to be seen by thousands of people worldwide? We need you, our customers, to send us pictures of yourself wearing our clothes. Check this. You’re not gonna get paid, but you will become famous. Just send your pix to <code><a href="mailto:jason@subcitizen.com">jason@subcitizen.com</a></code> and leave the rest to us.</p>
<p class="a2a_link">
<a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=Subcitizen&amp;siteurl=http%3A%2F%2Fwww.subcitizen.com%2Fblog%2F&amp;linkname=Wanna%20be%2 0famous%21&amp;linkurl=http%3A%2F%2Fwww.subcitizen.com%2Fblog%2Fgeneral%2Fwanna-be-famous%2F">
<img src= "http://www.subcitizen.com/blog/wp-content/plugins/add-to-any/bookmark.gif" width= "91" height= "16" alt= "Bookmark title="" />
</a>

<script type="text/javascript">a2a_linkname="Wanna be famous!";a2a_linkurl="http://www.subcitizen.com/blog/general/wanna-be-famous/";</script>
<script type="text/javascript" src="http://www.addtoany.com/js.dropdown.js?type=page"></script>

</p></p>

Subcitizen
11-19-2008, 07:12 PM
Thanks so much for your help. I feel like a real dufus, but here goes. I can't find that text in any of my files. I'm using Dreamweaver, and when I do a search nothing comes up. I even did a manual search in my WP Admin, and couldn't find anything. When I created the text I was using the WP admin. What file does WP download the text in to?

Thanks again for your help!! I really need it!!

Jason

Subcitizen
11-19-2008, 07:18 PM
This is the only thing that I can find that is remotely similar. It looks like the proper code without the text that I had written.


?>

<a name="a2a_dd" onmouseover="a2a_show_dropdown(this)" onmouseout="a2a_onMouseOut_delay()" href="http://www.addtoany.com/bookmark?sitename=<?=$sitename_enc?>&amp;siteurl=<?=$siteurl_enc?>&amp;linkname=<?=$linkname_enc?>&amp;linkurl=<?=$linkurl_enc?>">
<img src="<?=trailingsla****(get_option('siteurl')).PLUGINDIR.'/add-to-any/bookmark.gif'?>" width="91" height="16" alt="Bookmark"/>
</a>
<script type="text/javascript">a2a_linkname="<?=str_replace('"', '\\"', $linkname)?>";a2a_linkurl="<?=$linkurl?>";</script>
<script type="text/javascript" src="http://www.addtoany.com/js.dropdown.js?type=page"></script>

<?

But as you can see the <p> tags aren't there so I cant edit them.

Ahhhhhhhhh!!

Jason

jerry62704
11-19-2008, 08:00 PM
Hey,bAnyone


Hey,bbAnyone

See the difference (where "b" = " ")?

Subcitizen
11-19-2008, 08:45 PM
Sorry, I don't. Can you explain?

Thanks,
Jason

_Aerospace_Eng_
11-19-2008, 09:52 PM
Its not in your html. Its in the admin area of your blog.

Subcitizen
11-20-2008, 05:43 AM
Thanks for your help, _Aerospace_Eng_. But, I can't find the file. The file with the code used in the "show source" portion of the W3C Validation is not a file that I have in my local files. I don't know where to find the <p> stated in the error because when I do a search for "Anyone", "want", "seen", "worldwide", nothing comes up because that text is not anywhere in my local files. Do you know what I mean? Basically, I can't find that particular <p> tag that the W3C is referring to. Any advice on this would be much appreciated!

Thanks,

Jason

jerry62704
11-20-2008, 03:41 PM
If I search for "john..doe" when the entry is "john.doe" I won't find it. Replace the "." with spaces and you have the same thing. Do a find in this post for "john..doe" and you will get two hits. "john.doe" will give you a completely different two hits.

One post showed two spaces between "Hey, Anyone" and one showed one space between "Hey, Anyone".



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum