PDA

View Full Version : Problem with navigation button



yellowsenska
Oct 2nd, 2009, 10:13 PM
Hi there,

I'm making my first, very simple website. Around navigation bar , I have blue frame. Everything seems to work properly, just the frame. I'm new and this question might be very funny to some people but I will apreciate any help.Please see my coding.


<html>
<head>
<style type="text/css">
body
{
background-color: #570000;
background-image:url(STYLISTKA1.jpg);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center;
}
}
</style>
<div
style="
top: 720;
left: 690;
position: absolute;
z-index: 1;
visibility: show;">
<a href="drugastrona.html"><img src="mojaoferta.gif"alt="Mojaoferta"></a>
</div>

</head>

</head>
</html>


Thanks

CaptainB
Oct 2nd, 2009, 10:23 PM
Hi there,

First of all, you should always specify a doctype (http://www.w3schools.com/tags/tag_DOCTYPE.asp)

Second, it's much more accepted (and easier in the long run) to not style divs 'directly' but to give them an ID(or class) and then style that.

For example, this would do the same as your current code:

<head>
<style type="text/css">
body {
background-color: #570000;
background-image:url(STYLISTKA1.jpg);
background-repeat:no-repeat;
background-attachment:fixed;
background-position:center; }

#yourdiv {
position:absolute;
top: 720;
left: 690;
z-index:1;
visiblilty:show;
}
</style>
</head>
<body>
<div id="yourdiv">
<a href="drugastrona.html"><img src="mojaoferta.gif"alt="Mojaoferta"></a>
</div>
</body>

If you do not plan to make your divs layered, you don't need the z-index property. And you don't really need to set visibility:show; in order to make it show.

To make the blur border dissapear, set this in your css:


img {border:0;}