Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-05-2011, 06:40 PM   PM User | #1
Lpmraven
New Coder

 
Join Date: Aug 2009
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Lpmraven is an unknown quantity at this point
Exclamation Validation Output: 2 Errors

Hey guys, I'm kind of new to coding, I started working on websites a few years ago doing the design and artwork. So i am trying to learn new stuff and put together some good sites to go in my "folder of stuff ive done".

So heres my issue, thanks if you suggest some helpful stuff.
I validate all my sites (I say all, im trying to make 3 of my first ones atm.) with http://validator.w3.org. Heres the errors I still have to fix and I can't seem to get rid of.

Line 59, Column 18: document type does not allow element "div" here

<div id="content">



Line 112, Column 17: document type does not allow element "div" here

<div id="footer">


So they are both the same kind of thing. Heres the source code. (If you are thinking WTF is with all the Plugins, well im usingSubdreamer CMS as my content management system because i'm not pro like you guys, so don't beat me down... Please


<div id="content">

<div id="left_column">
<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>
</div>

<div id="right_column">
<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>

<plugin>
<div class="plugin" id="last">
<plugin_name><h3>[PLUGIN_NAME]</h3></plugin_name>
[PLUGIN]
</div>
</plugin>
</div>


<div class="clear"></div>
</div>


Second Source:

<div id="footer">
<p>&copy; <?php echo date(Y); ?> thefreelander.com </p>

<p>Designed and coded by Liam Raven.</p>

<p><a href="http://validator.w3.org/check?uri=referer">
<img style="border:0;width:88px;height:31px"
src="http://www.w3.org/Icons/valid-xhtml10"
alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>&nbsp;&nbsp;&nbsp;

<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss"
alt="Valid CSS!" />
</a>&nbsp;&nbsp;&nbsp;

<a href="http://jigsaw.w3.org/css-validator/check/referer">
<img style="border:0;width:88px;height:31px"
src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
alt="Valid CSS!" />
</a>
</p>
</div>

And heres the site link if you want to see how badly I am doing: http://www.cyber-technix.com/test1/index.php
Lpmraven is offline   Reply With Quote
Old 05-05-2011, 07:22 PM   PM User | #2
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
Somehow, you have a bunch of code BELOW your closing html tag. If you move all this:

Code:
<!-- Main Content -->
<div id="content">
		<!-- Left Column Start -->
		<div id="left_column">
			
			<div class="plugin">
				
				<div class="article_title"><a class="article_title_link" href="http://www.cyber-technix.com/test1/index.php?categoryid=1&amp;p2_articleid=1">Welcome to Freelander.com</a></div><h2>If I said you were over &pound;30 MILLION richer</h2>
<h2>than you knew, what would you say?</h2>
<br />
<p>Thank you very much for choosing Subdreamer! We are nearly there now, please follow <a href="admin/index.php">this link</a> to begin updating and changing your website from the admin panel.</p><div class="article_footer"><div class="article_footer_left">Published on  May 5, 2011 by Raven</div><div class="article_footer_right"><a class="article_print_link" href="http://www.cyber-technix.com/test1/plugins/p2_news/printarticle.php?p2_articleid=1" target="_blank">Print</a><a class="article_comments_link" href="http://www.cyber-technix.com/test1/index.php?categoryid=1&amp;p2_articleid=1#comments">Comments (0)</a></div>  </div><div class="pagination"></div>
			</div>
			
			
						
						
						
					</div>
		<!-- Left Column End -->
		
		<!-- Right Column Start -->
		<div id="right_column">
			
			<div class="plugin">
				<h3>Login Panel</h3>
				<form action="http://www.cyber-technix.com/test1/index.php?categoryid=1" method="post" >
          <input type="hidden" name="login" value="login" />
          Username:<br />
          <input name="loginusername" type="text" /><br /><br />
          Password:<br />
          <input name="loginpassword" type="password" /><br /><br />
          <input class="checkbox" type="checkbox" name="rememberme" checked="checked" value="1" /> Remember Me<br />
          <input type="submit" name="Submit now" value="Login" />
          </form><br /><br />Not registered?<br /><a href="http://www.cyber-technix.com/test1/index.php?categoryid=13">Register now!</a><br /><br /><a href="http://www.cyber-technix.com/test1/index.php?categoryid=13">Forgot your password?</a>			</div>
			
			
			
			<div class="plugin">
				<h3>Latest Articles</h3>
				<a href="http://www.cyber-technix.com/test1/index.php?categoryid=1&amp;p2_articleid=1">Welcome to Freelander.com</a><br /><br />			</div>
			
			
						
						
			
			<div class="plugin" id="last">
				<h3>Contact us!</h3>
				Need to contact us?<br /><br /><a href="index.php?categoryid=5">Click here!</a>			</div>
			
		</div>
		<!-- Right Column End -->
		
		<div class="clear"></div>
</div>
<div id="footer">
<p>&copy; 2011 thefreelander.com </p>
 
<p>Designed and coded by Liam Raven.</p>
 
<p><a href="http://validator.w3.org/check?uri=referer">
	<img style="border:0;width:88px;height:31px"
        src="http://www.w3.org/Icons/valid-xhtml10"
        alt="Valid XHTML 1.0 Transitional" height="31" width="88" /></a>&nbsp;&nbsp;&nbsp;
 
    <a href="http://jigsaw.w3.org/css-validator/check/referer">
        <img style="border:0;width:88px;height:31px"
            src="http://jigsaw.w3.org/css-validator/images/vcss"
            alt="Valid CSS!" />
    </a>&nbsp;&nbsp;&nbsp;
 
<a href="http://jigsaw.w3.org/css-validator/check/referer">
    <img style="border:0;width:88px;height:31px"
        src="http://jigsaw.w3.org/css-validator/images/vcss-blue"
        alt="Valid CSS!" />
</a>
</p>
</div>
and paste it above the last </div> tag on line 55, then see what happens.
__________________
Teed
teedoff is offline   Reply With Quote
Old 05-05-2011, 07:44 PM   PM User | #3
Lpmraven
New Coder

 
Join Date: Aug 2009
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Lpmraven is an unknown quantity at this point
Yes! All working good and fine now, just have an issue with it ALL not being centered? Any ideas?
Lpmraven is offline   Reply With Quote
Old 05-05-2011, 07:56 PM   PM User | #4
SB65
Senior Coder

 
Join Date: Feb 2009
Location: West Yorkshire
Posts: 2,817
Thanks: 9
Thanked 681 Times in 675 Posts
SB65 will become famous soon enoughSB65 will become famous soon enough
Code:
#wrapper {
	background: #fff;
	width: 974px; 
        margin:0 auto
}
SB65 is offline   Reply With Quote
Users who have thanked SB65 for this post:
Lpmraven (05-05-2011)
Old 05-05-2011, 08:28 PM   PM User | #5
Lpmraven
New Coder

 
Join Date: Aug 2009
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Lpmraven is an unknown quantity at this point
Thats great thanks, Ive tried to expand my navigation bar across the page at the top (hopefully pushing the background image down also, but it doesnt seem to be working.)

Any suggestions on how I could get that to work?
Lpmraven is offline   Reply With Quote
Old 05-05-2011, 08:36 PM   PM User | #6
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
Probably going to have to move the navigation elements out from within your wrapper, ABOVE your header div.

That may cause other problems though, depending on those header images you have.

Actually that wont work, since you've a background image defined on the body. You're going to have to rework your header with regards to that background image. Essentially you could remove the header and nav divs to outside your wrapper div, then set that image thats on the body as the header background...I think..lol
__________________
Teed

Last edited by teedoff; 05-05-2011 at 08:40 PM..
teedoff is offline   Reply With Quote
Old 05-05-2011, 08:43 PM   PM User | #7
Lpmraven
New Coder

 
Join Date: Aug 2009
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Lpmraven is an unknown quantity at this point
hmmm... yeah, I wonder if moving the background away from the top to a fixed distance will work?

How would I code a fixed distance from the top?

or am i climbing the wrong tree?
Lpmraven is offline   Reply With Quote
Old 05-05-2011, 08:50 PM   PM User | #8
teedoff
Senior Coder

 
Join Date: Aug 2010
Location: High Point, NC
Posts: 3,325
Thanks: 5
Thanked 363 Times in 360 Posts
teedoff is on a distinguished road
The image is set on the body, so no that wont work.

Do you use Firebug? Its free download for firefox browser. Very useful.
__________________
Teed
teedoff is offline   Reply With Quote
Users who have thanked teedoff for this post:
Lpmraven (05-05-2011)
Old 05-05-2011, 09:03 PM   PM User | #9
Lpmraven
New Coder

 
Join Date: Aug 2009
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Lpmraven is an unknown quantity at this point
I got an idea, could I take the background image into photoshop, add the nav bar to the top then i could put the nav back into the wrapping to keep it inline.?
Lpmraven is offline   Reply With Quote
Old 05-05-2011, 09:13 PM   PM User | #10
Lpmraven
New Coder

 
Join Date: Aug 2009
Posts: 14
Thanks: 2
Thanked 0 Times in 0 Posts
Lpmraven is an unknown quantity at this point
Sweetabix. We rock! nice one you guys, high 5¬! ah thanks for that Teed, its a good tool, just downloaded it and it made me think of the solution.

Just a small problem somewhere in the css coding, in my forms and stuff the background is taken from the bg image rather than just white... going looking

Thanks all.
Lpmraven is offline   Reply With Quote
Reply

Bookmarks

Tags
div, errors

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:12 PM.


Advertisement
Log in to turn off these ads.