Jump to content


weird xhtml/css problem


3 replies to this topic

#1 Nightscream

    Young Padawan

  • Members
  • Pip
  • 100 posts
  • Gender:Male
  • Location:Belgium

Posted 21 August 2007 - 07:30 PM

I just found a something weird never happend to me before
With this css it won't show my header layer
It works in IE but not FF
#container {
	width: 1000px;
	height: 500px;
	overflow: hidden;
	margin: 0;
}

#LeftBar {
	background: url(images/LeftBarBack.gif) repeat-y;
	width: 16px;
	height: 500px;
	float: left;
}

#TopBar {
	background: url(images/TopBar.gif) repeat-x;
	width: 968px;
	height: 30px;
}

#Header {
	width: 968px;
	height: 110px;
}

but when i'm changing header id to this
it will show my image
#Header {
	width: 968px;
	height: 110px;
	background: url(images/Header.gif) no-repeat;
}

html 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=iso-8859-1" />
<title>Untitled Document</title>
<link href="styles.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="container">
	<div id="LeftBar"><img src="images/LeftBar.gif" width="16" height="191" /></div>
	<div id="TopBar">&nbsp;</div>
	<div id="Header"><img src="images/Header.gif" width="968" height="110" /></div>
</div>
</body>
</html>

Edited by Nightscream, 21 August 2007 - 07:30 PM.


#2 _*Creative Insanity_*

  • Guests

Posted 21 August 2007 - 08:05 PM

background-image: url(images/TopBar.gif) repeat-x;
also make sure the name is capped as you printed it.

Edited by Creative Insanity, 21 August 2007 - 08:05 PM.


#3 Nightscream

    Young Padawan

  • Members
  • Pip
  • 100 posts
  • Gender:Male
  • Location:Belgium

Posted 21 August 2007 - 08:13 PM

i'm talking about the header id
it's only showing when I add a background but i have an <img src""> inside the div:s
and without the background it's not displaying, that's what i think is weird

#4 Lastcrime

    Impatient Jedi that likes to eat cereal

  • Members
  • PipPipPip
  • 649 posts
  • Gender:Male
  • Location:Toronto, Ontario, Canada
  • Interests:Soccer, Snowboarding, Hockey, B-ball, Skateboarding, Computers!

Posted 21 August 2007 - 08:56 PM

if youre going to use the html to get the image and size it theres not point in having the header div, try doing it outside of a div and see what happens. Its probly better just to use it in the css if your going to use a div anyway.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users