Jump to content

Image not displaying - HTML

Fredrikmikael
Go to solution Solved by fletch to 99,

Fixed it for ya :) (and cleaned up some of the code)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">	<head>		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />		<title>Sjoveganlan.net</title>		<link href="css/style.css" rel="stylesheet" type="text/css" />		<link rel="shortcut icon" href="images/favicon.ico" />		<style type="text/css">		body 		{   			background-image: url('images/cswp.jpg');			background-attachment: fixed;			background-size: cover;		}		</style>	</head>	<body>		<center> 			<a href="linktest.html" target="_blank">				<img src="images/fittHeader1.png" height="150" 				onmouseover="this.src='images/fittHeader2.png'" 				onmouseout="this.src='images/fittHeader1.png'" >			</a>			<span style="font-family:verdana;font-size:25px">			<script language="JavaScript">				TargetDate = "02/24/2014 5:00 AM";				BackColor = "";				ForeColor = "white";				CountActive = true;				CountStepper = -1;				LeadingZero = true;				DisplayFormat ="%%D%% <b>d %%H%% h %%M%% m %%S%% s</b>";				FinishMessage = "<b>NO E DET LAAN PÅ G!!</b>";			</script>			<script language="text/Javascript" src="http://scripts.hashemian.com/js/countdown.js"></script>			</span>		</center>		<div id="svart">			<img src="images/Svart.jpg" width="300" height="500"/>		</div>	</body></html>

i am making a menu section for my webpage and i want to have a black background image where i will put all my hyperlinks ontop off.

heres my problem, the image isnt displaying in browser/ when i upload it to the server.

_________________

<CSS>               

_________________

#svart {position:relative;top:30px;left:10px;}
__________________
</CSS>
_________________
<HTML>
_________________
<body><div id="svart"<img src="images/Svart.jpg" width="300" height="500"</div></body>

________________

</HTML>

________________

 

Here is how it shows in Dreamweaver

 

2yx200j.jpgAnd here and here is how it shows in the browser

1zqwwvk.png

 

 

 

You can clearly see that the black image on the left side isnt showing in the browser.

what is the problem ?

 

 

PS. i have attached the HTML and CSS

 

PSS. you can also check it out here

view-source:http://sjovegan-ikt.no/

http://sjovegan-ikt.no/css/style.css

http://sjovegan-ikt.no/images/

index.html

style.css

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

I wish I knew HTML, but when you put in the code for the black box did you save it then revisit the site for a test?

Link to comment
Share on other sites

Link to post
Share on other sites

I wish I knew HTML, but when you put in the code for the black box did you save it then revisit the site for a test?

Yes i saved both the css stylesheet and the changes to the index if that is what you meant.

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Yes i saved both the css stylesheet and the changes to the index if that is what you meant.

Try making the box select-able?

Link to comment
Share on other sites

Link to post
Share on other sites

Try making the box select-able?

i really do appreciate you trying to help me, but i think i need help from somebody who knows what they are talking about, no offense but as you said yourself, you dont know HTML.

if you had any tips on how to clear up the code or something new to try that would be most helpfull but i really cant work with "Try making the box select-able?"

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

i really do appreciate you trying to help me, but i think i need help from somebody who knows what they are talking about, no offense but as you said yourself, you dont know HTML.

if you had any tips on how to clear up the code or something new to try that would be most helpfull but i really cant work with "Try making the box select-able?"

Sorry I'm just used to trouble shooting on c++ and c#, hope you are able to fix the problem

Link to comment
Share on other sites

Link to post
Share on other sites


<body>

<div id="svart"

<img src="images/Svart.jpg" width="300" height="500"

</div>

</body>


<html>

<body>

<div id="svart">

<img src="images/Svart.jpg" width="300" height="500" />

</div>

</body>

</html>

1474412270.2748842

Link to comment
Share on other sites

Link to post
Share on other sites

Fixed it for ya :) (and cleaned up some of the code)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">	<head>		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />		<title>Sjoveganlan.net</title>		<link href="css/style.css" rel="stylesheet" type="text/css" />		<link rel="shortcut icon" href="images/favicon.ico" />		<style type="text/css">		body 		{   			background-image: url('images/cswp.jpg');			background-attachment: fixed;			background-size: cover;		}		</style>	</head>	<body>		<center> 			<a href="linktest.html" target="_blank">				<img src="images/fittHeader1.png" height="150" 				onmouseover="this.src='images/fittHeader2.png'" 				onmouseout="this.src='images/fittHeader1.png'" >			</a>			<span style="font-family:verdana;font-size:25px">			<script language="JavaScript">				TargetDate = "02/24/2014 5:00 AM";				BackColor = "";				ForeColor = "white";				CountActive = true;				CountStepper = -1;				LeadingZero = true;				DisplayFormat ="%%D%% <b>d %%H%% h %%M%% m %%S%% s</b>";				FinishMessage = "<b>NO E DET LAAN PÅ G!!</b>";			</script>			<script language="text/Javascript" src="http://scripts.hashemian.com/js/countdown.js"></script>			</span>		</center>		<div id="svart">			<img src="images/Svart.jpg" width="300" height="500"/>		</div>	</body></html>

There are 10 types of people in this world, those who can read binary and those who can't.

There are 10 types of people in this world, those who can read hexadecimal and F the rest.

~Fletch

Link to comment
Share on other sites

Link to post
Share on other sites

<body><div id="svart"<img src="images/Svart.jpg" width="300" height="500"</div></body>
<html><body><div id="svart"><img src="images/Svart.jpg" width="300" height="500" /></div></body></html>

oh my god, i am a moron.

and you are a life saver.

 

i had done <div id="svart"

and it was <div id="svart">

 

i love you fizzlesticks!!

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

 

Fixed it for ya :) (and cleaned up some of the code)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">	<head>		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />		<title>Sjoveganlan.net</title>		<link href="css/style.css" rel="stylesheet" type="text/css" />		<link rel="shortcut icon" href="images/favicon.ico" />		<style type="text/css">		body 		{   			background-image: url('images/cswp.jpg');			background-attachment: fixed;			background-size: cover;		}		</style>	</head>	<body>		<center> 			<a href="linktest.html" target="_blank">				<img src="images/fittHeader1.png" height="150" 				onmouseover="this.src='images/fittHeader2.png'" 				onmouseout="this.src='images/fittHeader1.png'" >			</a>			<span style="font-family:verdana;font-size:25px">			<script language="JavaScript">				TargetDate = "02/24/2014 5:00 AM";				BackColor = "";				ForeColor = "white";				CountActive = true;				CountStepper = -1;				LeadingZero = true;				DisplayFormat ="%%D%% <b>d %%H%% h %%M%% m %%S%% s</b>";				FinishMessage = "<b>NO E DET LAAN PÅ G!!</b>";			</script>			<script language="text/Javascript" src="http://scripts.hashemian.com/js/countdown.js"></script>			</span>		</center>		<div id="svart">			<img src="images/Svart.jpg" width="300" height="500"/>		</div>	</body></html>

you are my hero!

i wish i could say more but i cant. i just... am speechless

System

Spoiler

CPU: Intel Core i7 5820K @4.5GHz - 1.230v  RAM: HyperX Fury DDR4 4x4GB 2666MHz  MB: MSI X99S SLI PLUS  CASE: NZXT H440  CPU-COOLER: Fractal Design Kelvin S24  PSU: Corsair RM1000W w/ white sleeved cable kit  GPU: MSI GeForce RTX 2070 ARMOR  MONITOR: LG 27GL850-B  STORAGE: Samsung 970 EVO 1TB M.2, Samsung 840 EVO 256GB,  WD Red 3TB

 

 

 

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Np :)

 

 

you are my hero!

 

i wish i could say more but i cant. i just... am speechless

There are 10 types of people in this world, those who can read binary and those who can't.

There are 10 types of people in this world, those who can read hexadecimal and F the rest.

~Fletch

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×