PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, July 26, 2022

[FIXED] Why can't I see image in design view but can see it in browser?

 July 26, 2022     css, dreamweaver, html     No comments   

Issue

I can see my menubar when I preview webpage in browser but I cannot see it in Dreamweaver design view?

Here is my code incase there is a mistake CSS;

#bar {  
  margin-top:5%;
  background:url("/Users/Macbook/Desktop/test website/images/bar.png") no-repeat center; 
  height:50px;
  background-size:100% 100%;
}

HTML;

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<link href="Untitled-3.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="bar">
</div>
</body>
</html>

Thankyou for your help.


Solution

i think your image path is not good

when you work for web,

attempts to your organization like this

-root folder
----img folder
----css folder
----js folder

etc, etc (it's just an exemple) in your case try this

-root folder
    index.html
----img (contain bar.png)
----css (contain Untitled-3.css)

dont forget to replace path in html for css :

<link href="css/Untitled-3.css" rel="stylesheet" type="text/css">

and of course in css :

background:url("../img/bar.png") no-repeat center; 

try this : )



Answered By - jmercier
Answer Checked By - Terry (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing