Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Total Newbie Question about "there is no attribute "align"

    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:

    Code:
    <!-- 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:

    Code:
    /** 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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    #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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Regular Coder
    Join Date
    Nov 2005
    Posts
    329
    Thanks
    3
    Thanked 19 Times in 19 Posts
    Not clear what you are trying to centre.
    Divs are centred horizontally using:
    Code:
    margin-left: auto; margin-right:auto
    Text in a div can be centred horizontally by using:
    Code:
    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!

  • #4
    Regular Coder
    Join Date
    Aug 2005
    Location
    MS
    Posts
    844
    Thanks
    11
    Thanked 79 Times in 77 Posts
    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.
    ☠ ☠RON☠ ☠

  • #5
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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:

    Code:
    </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:

    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
    Last edited by Subcitizen; 11-18-2008 at 06:58 AM.

  • #6
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Just get rid of that div. Its not doing anything.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    oesxyl (11-19-2008)

  • #7
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks so much, _Aerospace_Eng_!!!!! You Rock!!!!!!


    Jason

  • #8
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #10
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Oh sorry. Here it is:

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

    Thanks so much!!!

    Jason

  • #11
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    Code:
    <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%20famous%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>
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #12
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #13
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

    Code:
    ?>
    
    <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

  • #14
    Senior Coder jerry62704's Avatar
    Join Date
    Oct 2007
    Location
    Springfield, IL
    Posts
    1,100
    Thanks
    13
    Thanked 87 Times in 87 Posts
    Quote Originally Posted by Subcitizen View Post
    Hey,bAnyone
    Quote Originally Posted by Subcitizen View Post
    Hey,bbAnyone
    See the difference (where "b" = " ")?
    Last edited by jerry62704; 11-19-2008 at 07:02 PM.
    .
    .
    ...and gladly would he learn and gladly teach

    Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls

  • #15
    New Coder
    Join Date
    Nov 2008
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry, I don't. Can you explain?

    Thanks,
    Jason


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •