3 Replies - 1046 Views - Last Post: 17 January 2009 - 07:54 PM

#1 VailSkiBum   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-January 09

Image help with css/html

Posted 17 January 2009 - 04:07 AM

I am very new with css and I have an issue that I can't seem to overcome. I am using Dreamweaver CS4 and the images in my css file are not showing in Live View or when published. Here is a sample snippet of css and html as well as the temp page. The image is uploaded correctly, and it does work in design view of DW, but that's as far as it will go. Can someone tell me what is wrong? Thanks in advance.

Here is the css:

.cssbox, .cssbox_body, .cssbox_head, .cssbox_head h2 { 
background: transparent url(img.php.png) no-repeat bottom right
} 

.cssbox {
width:205px !important; /* IE Win = width - padding */ 
width: 190px; 
padding-right:15px;
margin:20px auto
}

.cssbox_head {
background-position:top right;
margin-right:-15px;
padding-right:40px
} 

.cssbox_head h2 { 
background-position:top left; 
margin:0;
border:0;
padding:25px 0 15px 40px; 
height:auto !important; 
height:1% 
} 

.cssbox_body { 
background-position:bottom left; 
margin-right:25px;
padding:15px 0 15px 40px
} 



Here is the html:

<!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>Untitled Document</title>
<link href="css/boxes.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="cssbox">  
  <div class="cssbox_head">  
	<h2>This is a header</h2>  
  </div>  
  <div class="cssbox_body">  
  <p>This is for your content.</p>  
  </div>  
</div> 
</body>
</html>



Link to temp page: http://vailskibum.00....com/boxes.html

There should be a box with round corners around the text.

This post has been edited by VailSkiBum: 17 January 2009 - 04:08 AM


Is This A Good Question/Topic? 0
  • +

Replies To: Image help with css/html

#2 BenignDesign   User is offline

  • holy shitin shishkebobs
  • member icon




Reputation: 8143
  • View blog
  • Posts: 12,514
  • Joined: 28-September 07

Re: Image help with css/html

Posted 17 January 2009 - 08:29 AM

is your image file REALLY called img.php.png?
Was This Post Helpful? 0
  • +
  • -

#3 StapledPuppet   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 39
  • Joined: 17-January 09

Re: Image help with css/html

Posted 17 January 2009 - 11:03 AM

Well, Dreamweaver is a bit strange in the way that you give it the loacation of an image, but when it come to search for that in the online directory, the files get muddled. So what you should first check that it is actually an image file. Then, make sure that all your folders on your hosting are properly arranged so that the relate back to the html files. I don't think it has much to do with incorrect CSS - more of a 'wrongly linked' kinda thing.

Hope this helped, if it didn't sorry for wasting peoples time :P
Was This Post Helpful? 0
  • +
  • -

#4 Arenlor   User is offline

  • D.I.C Regular
  • member icon

Reputation: 38
  • View blog
  • Posts: 427
  • Joined: 26-April 06

Re: Image help with css/html

Posted 17 January 2009 - 07:54 PM

I can see it's working now, but wanted to let you know that this may cause a problem:
<html><center>
<script type="text/javascript" src="http://www.klixmedia.com/ad_serve.aspx"></script>
</center><!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">

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1