Status
Not open for further replies.

mak_capri

Active Member
51
2010
1
0
I want to create header function in CSS and call it from HTML code. Image displays when I type anything in the div header. But If I remove text or all br / tags, header never displays. I know, there is HEADER tag in html, but I do not want to use header tag.

Any help would be appreciated.

HERE IS MY CODE
file.jpg


THIS IS ORIGINAL WEBSITE


original.jpg


THIS IS MY WEBSITE

mine.jpg
 
8 comments
Try this

Code:
#header{
background:url("../images/header.jpg") no-repeat;
width:950px;
height:120px;
display:block
}

Tell me if this works.

PS: Use Sublime Text Editor 2 for coding :)
 
Great. It works.. Can you explain me or guide me, how you do this?

Secondly, you can see the original picture. Header is on top and there is no link space. But in my there is a line gap before header. HOW TO REMOVE IT?
 
Try this

Code:
#header{
background:url("../images/header.jpg") no-repeat;
width:950px;
height:120px;
display:block
}
Tell me if this works.

PS: Use Sublime Text Editor 2 for coding :)

:whistling::whistling::whistling::whistling: :)

use chrome inspect element or firefox add-on use firebug. it helps for css coding in site.

PS: Use Sublime Text Editor 2 for coding : awesome app...

use padding ....
 
Below is my code. Someone please explain me why there are gaps. However, all margin and padding is ZERO. Then WHY? please tell the reason.


<html>

<head>
<style>
li {
list-style:none;
border:1px solid orange;
display:inline;
}

ul {
margin:0px;
padding:0px;
}

#navbar {
margin:0px;
padding:0px;
}

</style>
</head>

<body>
<div id="navbar">
<ul>
<li>Home</li>
<li>About Us</li>
<li>Services</li>
<li>Products</li>
<li>Contact</li>
</ul>
</div>

</body>

</html>


353714g.jpg
 
Status
Not open for further replies.
Back
Top