[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Html - invisible <br style><p></p> showing up in chrome debug

Posted on 2010-09-20
13
Medium Priority
?
261 Views
Last Modified: 2012-08-13
Hi, if you visit this link:  http://marckandalaft.com/index.php?k=MK

there is a bit wider of a gap between the submenu and the content section than i want.  You will notice the wider gap if you compare it to any other section in the site.

If you analyze the page in google chrome developer - and click into the div's -to highlight them - you will find that the gap is caused by the lines <br style><p></p>.  The problem is that those lines do not exist in the source code - look at the source!  I did a search for <br style> in the .php file and nothing.  

where the heck are those lines coming from?

thanks
0
Comment
Question by:nbj622
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
13 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 33721363
Your javascript is adding "<br>  <p></p>" between "<!-- START MK SECTION -->" and '<table width="100%">'.  If you have Firefox Web Developer, use "View Generated Source" to see it.
<!-- START MK SECTION -->	                
  
        
       		<br>
                            
		                    <p></p><table width="100%">

Open in new window

0
 

Author Comment

by:nbj622
ID: 33721402
i just deleted the block of javascript and all the whitespace right after<!-- START MK SECTION --!> between <table...> -   the problem is still there wtf?!
0
 

Author Comment

by:nbj622
ID: 33721445
this is the snippet from the php file - notice nothing comes after <!-- START MK SECTION -->

---------------------------

<!-- END PHOTOGRAPHY SECTION -->      

<?php }else{ ?>



                                                <!-- START MK SECTION --><table width="100%">
                            <tr>
                       
                       


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!

 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 33721461
Right under "Maria Lund" you have a broken <div , no '>'.
<!-- Maria Lund -->	                

 <div class="block2"

Open in new window

0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 33721489
I know you won't find anything in the PHP file.  It is being done by one of the javascripts on the page.  That's why you see it in the 'DOM' view and not the source.  I just can't tell which one it is yet.
0
 

Author Comment

by:nbj622
ID: 33721510
thx for the broken div info - fixed.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 33721522
You have "<div id="publications">" in more than one place.  'id' should be unique.  'class' can be repeated.  In addition, there is "<p></p>" in the DOM source before "<div id="publications">" when in the original source it is "</p><p>".  Some javascript is rearranging things I think.
0
 

Author Comment

by:nbj622
ID: 33721685
i fixed all of the publications and <p> and <b> tags within.  the client made a mistake there.  the problem still persists. :(
0
 

Author Comment

by:nbj622
ID: 33721699
im running the validator on it now, i need to clean it up
0
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 1500 total points
ID: 33722820
I had to go to work this evening.  Looks like you have the original problem cleared up but the publications and <p> tags still act different between the original source and the DOM source.  I'll check in in the morning.
0
 

Author Comment

by:nbj622
ID: 33725455
through validating i found the sneaky <br/> - it was hidden between td's right after <!--- Publications Start --> .  the DOM must have slid it back towards the START MK, making it tricky to find using the developer tools. my client introduced a bunch of errors into the file - i should have gone to the validator first.  hey dave thanks for the help and ill award you the points cuz your publications tip was just about right.
0
 

Author Closing Comment

by:nbj622
ID: 33725467
not an exact answer.  very close though.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 33727154
Thanks, glad I could help.  That would make it hard to find.  I've had those where I accidentally put something in between tags in a table.  It always moves it to just before the table in the DOM.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question