Remove the space from html - html

I am working with HTML, Javascript and jquery mobile. At the top of a lateral panel there is a space caused by some characters. Is there a way to remove them directly from the HTML code without using Javascript? I am using the UTF-8 charset but I will change it if it can solve the problem.
EDIT:
Here is the html I saved on the server:
<div data-role="panel" data-position="left" data-position-fixed="true" data-display="overlay" id="left-panel" data-theme="b">
.... html code ....
</div>        
Here is the html generated by jquery mobile:
<div data-role="panel" data-position="left" data-position-fixed="true" data-display="overlay" id="left-panel" data-theme="b" class="ui-panel ui-panel-position-left ui-panel-display-overlay ui-body-b ui-panel-fixed ui-panel-animate ui-panel-open">
<div class="ui-panel-inner">
.... html code ....
</div>
</div>

Just delete the &nbsp from your code. That's it.

I had the same thing happen to me. I'm guessing that you copied code from their "View Source" examples. Apparently when you copy from that it has a bunch of spaces rather than tabs for formatting. If you remove all the excess spaces it should work fine. This happened to me using Sublime Text 2.

Related

Add comment after html closing tab with sublime text

I want to know if is possible to add comments to existing html closing tags, for example:
<div class="container">
Content
</div>
And I want to format it to be like this:
<div class="container">
Content
</div> <!-- /.container -->
With emmet (.container>{Content}) I will have to rewrite all my code to get the comments, so it's possible to add closing comment with sublime text 3 to an existing html code instead to rewrite it again using emmet?
I'm not sure I understand the end of your post regarding emmet, but adding a comment after the HTML closing tag should be fine as any comments in an HTML file are ignored by the browser regardless of where they are placed.
Hope this helps.

My HTML Link Is Not Working

I am new to HTML, and that's about to be very obvious, but I need some help on putting a simple link onto my website. The problem I'm experiencing is that my link when clicked on in Safari tries to pull from "file:///Users/kingwoody1/Desktop/Sample%20Website/“http://www.google.com/â€%C2%9D".
What am I missing? Why isn't it just going loading up google.com?
My code looks like this:
<html>
<body>
<div class=“headings”>
<h1>Scott Woodson for President</h1>
<p>A Man Of The People</p>
</div>
<div class=“options”>
<ul>
<li>
Search for stuff
</li>
</ul>
</div>
</body>
You have funky quotes which are probably breaking safari. Change all of the “ and ” to ":
<div class=“headings”> to <div class="headings">
and
<div class=“options”> to <div class="options">
This all looks good to me!
The only problem I can see in this code are the speach marks. Make sure to use the (") version for coding.
Not sure if this will help your problem or not.
Close your </html> tag it may cause some problems.
By the way it works fine on Safari!
your code works fine, but remember to close with
<./html>
, and use " as the funky quotes can cause problems in PHP (not sure about html). Try using http://jsfiddle.net/ to test websites, and it allows you to make small changes without having to reopen the page.

What can I do to fix this Tumblr Custom HTML code for header links?

I'm trying to edit Tumblr Custom HTML to add another header link to my Tumblr theme.
I have searched stackoverflow for "Tumblr" "Custom HTML" "block:Pages" and "link" but have not found the bug in my code that's leading to the following problem:
I copy and pasted
<li>{lang:Archive}</li>
I then changed
"/archive/"
to
"/submit/"
and
{lang:Archive}
to
{lang:Submit a Post}
I end up with a webpage with a header link that, when clicked on, takes you to the correct page, but there is no text for that link. Please see a screenshot of the problem and the website I'm trying to fix.
I've included a code snippet so that you can help me troubleshoot. Thank you!
<div class="container">
<div id="headerwrap">
<div class="span-18" id="header">
<div class="span-18 last"><ul>
<li>{Title}</li>
{block:HasPages}
{block:Pages}<li>{Label}</li>{/block:Pages}
{block:HasPages}
<li>{lang:Random post}</li>
<li>{lang:Submit a Post}</li>
<li>{lang:Archive}</li>
</ul></div>
</div></div>
{block:IfHeaderImage}<img src="{image:Header}"/>{/block:IfHeaderImage}
<div class="span-24"><div class="span-5 blue_striped"> </div><div class="span-18 last"><p>{Description}</p></div></div>
<hr/>
The {lang:} tag lets you specify an English string that should be displayed in the user's language, but it only works with a predefined set of strings that can be found here:
http://www.tumblr.com/docs/en/localizing_themes
You can "request a string be added", but I have no idea how long that would take. Best would probably be to drop the {lang:} wrapper and just include the text directly:
<li>Submit a Post</li>
The string won't be localized for non-English users, but oh well!

PHP include() creates unwanted gaps in HTML

I have a document that includes a header (menu) and a footer in PHP:
<?php include('header.php'); ?>
<?php include('footer.php'); ?>
For some reason when opened on the browser it renders a gap between both without having any margins or CSS styles doing it:
This is part of the code generated, the gap appears between </header><footer>:
<div class="ClearFloat"></div>
</nav>
</header><footer>
<div class="MainWrapper">
<ul>
<li>© Copyright 2013</li>
If I inspect using firebug I do see a gap in the code:
</nav>
</header>
<footer>
<div class="MainWrapper">
<ul>
Furthermore if I try to edit the code in firebug I get a weird entity number where the gap appears: :
</nav>
</header><footer>
<div class="MainWrapper">
<ul>
This has to do something with php because if I write the HTML of the header and the footer straight in the page the gap disappears:
Any ideas? Thanks.
As Per Why is  appearing in my HTML?
it may have a Simple Fix!
The character in question &#65279 is the Unicode Character 'ZERO WIDTH
NO-BREAK SPACE' (U+FEFF) attached to your code on a copy/paste or during a faulty Save
its so simple to fix that,
just open that file by notepad++ and step follow -->
Encoding->Encode in UTF-8 without BOM. then save that. It work for me as well!
The character in question &#65279 is the Unicode Character 'ZERO WIDTH NO-BREAK SPACE' (U+FEFF). It may be that you copied it into your code via a copy/paste without realizing it.

DNN MobiNuke Module Empty Div Tag Issue

I am using the DNN MobiNuke Module (v02.00.03) from DataQuadrant to create a mobile version of a website I have created. Everything is going well EXCEPT a weird issue I am running into with the Mobile Skins. I have a simple Mobile Skin that looks like this:
<div id="mobile_frame">
<div id="mobile_header">
...
...
</div>
<div id="main_wrap">
<div id="mobile_main" class="sub">
<div id="ContentPane" runat="server"></div>
</div>
</div>
<div id="mobile_footer">
...
...
</div>
</div>
The issue that is arising is that ANY content in the ContentPane that has an empty div tag will change itself when rendered in a mobile browser:
<div class="xxxx"></div>
Will change itself to
<div class="xxxx" />
The biggest problem that this is causing is that the browser is interpreting the tag as an opening div tag with no closing tag. Therefore it is placing an ending div tag essentially wherever it wants. It's causing ALL of the markup after this area to get very messed up.
Here is an example of the code as it should be, and how it is rendering on the page:
Should be:
<div id="main_wrap">
<div id="mobile_main" class="sub">
... Content Here ...
</div>
</div>
<div id="mobile_footer">
...
</div>
</div>
But it renders as:
<div id="main_wrap">
<div id="mobile_main" class="sub">
... Content Here ...
</div>
<div id="mobile_footer">
...
</div>
</div>
</div>
I can fix this in the markup that I have control of by putting inside of the tags, but I do not have the time/energy to go through EVERY module that might be showing up in the ContentPane to check for empty tags. In addition, there are places where I want an empty tag to fill it with content later with javascript.
Lastly, I did a TON of research to look this up and I cannot find a thing. The closest that I found is that this happens in XSLT when transforming some XML, but as far as I know MobiNuke is not doing that.
Any help is greatly appreciated. Thanks!
I have figured out the issue after having a discussion with the vendor. There is a setting in the module settings called "Enable content adaptation". Apparently the setting will try to make the HTML to be XHTML compliant, but it was definitely not working for me. Hope this helps anyone else seeing this.