My HTML Link Is Not Working - html

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.

Related

Remove the space from 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.

HTML tags with spaces

so I have a strange request. I've been working on some security project for school, and I've been able to successfully inject some html code using a form on our test site. What's interesting is that it only accepts the html code as one line and with no spaces. This brings me to my question, so far I've only been able to get text and font color changes to work. But I want to see if someone could inject images/audio/video.
I'm trying to figure out how to turn this:
<img src="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"/>
Into this:
<imgsrc="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"/>
but add a space with code.
I've tried adding the but that only works with actualy text and not the tag itself. Any help is appreciated.
Interesting note: I was able to inject <font size="50" color="red"></font>
But I have no idea why that works but the image doesn't.
Have you tried the following?
A slash:
<img\ src="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"/>
Using a non-traditional closing tag:
<img src="http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png"></img>
Injecting a blank <img> tag:
<img src=""/>
Here's another solution: Try inline CSS:
<div style="background:url(http://www.rtur.net/blog/image.axd?picture=2011%2F12%2Fcss.png);height:400px;width:400px"></div>
See this fiddle: http://jsfiddle.net/9MYrM/

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!

<ul> not working properly in IE9?

Hi I have a bizarre problem. When I open my site http://www.blackflow.pl/ in IE9 "Polecamy" section on the blue footer(bottom part) gets messed up. It works when I turn on the "compability mode". When you look at the source it's just a simple list.
Everything works fine on other browsers
A <strong> tag as a direct child of a <ul> is invalid HTML. Infact, if you run your webpage through the w3 validator, you'll see that it has 46 errors, quite a few of which are related to that <ul> with a in it.
Edit: Looks like I saw the wrong ul... But the one you're having the problems with has the same error.
actually this ul isn't the same as the rest - the first "a" element is right under the ul and not inside the first li. this probably what's causing the problem
Your code is wrong on "Polcamy":
<a class="footer" href="http://blackflow.pl/index.php?id=11" target="_self">
<strong>Polecamy</strong>
<li>-Serwis Komputerowy</li>
</a>
You may render the page as IE8/IE7 like
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7"/>

iframing in header that has CSS dropdowns in it - good solution to get the dropdowns outside of the iframe?

I'm working on migrating a fairly large site to a new framework, but we're doing it in separate stages, so I'm trying to find a good way to wrap the current layout around my new framework. Ideally, a simple structure like this would suffice:
<body>
<iframe src="old_framework/top.php" />
<div id="main_content"></div>
<iframe src="old_framework/bottom.php" />
</body>
Problem being that top.php is a menu with CSS dropdowns and they need to overlap #main_content.
I get that I can't break out of top.php's iframe like that, so this structure will not work, but I'm curious if anyone has encountered a similar situation and found a workaround.
I think the problem with the iframes cannot be fixed!
Another way to solve the problem could be removing iframes and, for example, try to do this way:
<body>
<div id="top"><?php include_once("old_framework/top.php"); ?></div>
<div id="main_content"></div>
<div id="bottom"><?php include_once("old_framework/bottom.php"); ?></div>
</body>
Honestly, using php (or similar) includes will save you a lot of headaches. Iframes aren't used much any more and are nothing but trouble in my experience.
I appreciate the comments from everyone. I wound up just totally re-implementing the old layout in my new framework. Took a little bit, but definitely less hacky than any other solution.
#Joel Etherton: I actually audibly LOL'd when I read your comment. Rest assured, I won't be receiving said award now.