It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Positioning images for a vertical navigation bar

Positioning images for a vertical navigation bar

Postby kalmykov on Wed Aug 10, 2011 7:39 pm

Hi all,

Graphic designer here hell bent on learning web design with a question probably asinine for all those viewing but vexing to me for the last week.

I have a site beautifully designed ( and seemingly straight forward and basic but making it functional on the web as I designed is proving to be quite the arduous task.

I have many questions concerning this project but I'll keep this thread focused on the code for positioning images on the navbar. I have the buttons (67px by 14px) and sidebar (36px by 594px) all measured out and have tried a few different semantics to accomplish this but all for not. The images always end up stacking in the top left corner.


[HTML]<body>

<div id="butttons">
</div>


<div id="nav">
<img src="images/layout/images/Side_nav.png"/>

</div>
<div id="butttons">
<div id="nav_Home">
<img src="images/layout/images/Home.png"/>
<div id="nav_Portfolio">
<img src="images/layout/images/Portfolio.png"/>
<div id="nav_Contact">
<img src="images/layout/images/Contact.png"/>
</div>

</body>[/HTML]

And then this is the Refferenced style sheet

[HTML]
#nav {
position: absolute;
top: 0px;
left: 0px;
}

div.nav_side {
background-image: url(images\layout\Side_nav.gif);
background-repeat: no-repeat;
background-position: top center;
width: 36px;
height: 594px;
}

#buttons {
position: absolute;
background-repeat: no-repeat;
background-position: top center;

top: 500px;
left: 36px;
}
.nav_home {
background-image: url(images\layout\Home.gif);
background-repeat: no-repeat;
background-position: top center;
position: absolute; top: 552; left: 35;
width: 67px;
height: 14px;
}
.nav_Portfolio {
background-image: url(images\layout\Portfolio.gif);
background-repeat: no-repeat;
background-position: top center;
position: absolute; top: 566; left: 35
width: 67px;
height: 14px;
}
.nav_Contact {
background-image: url(images\layout\contact.gif);
background-repeat: no-repeat;
background-position: top center;
style="position: absolute; top: 580; left: 35;"/>
width: 67px;
height: 14px;
}
[/HTML]

I literally just started learning Html /CSS / Java a month ago; spare no details!

ANY help with ANY (text formatting, background gradient that adjusts relative to a screen size, rollovers on the nav etc...) part of putting this site together will be more appreciated then most can fathom. I'd be willing to exchange some graphic work if any of you stuck this out to the end with me.
kalmykov
 
Posts: 1
Joined: Wed Aug 10, 2011 7:32 pm

Re: Positioning images for a vertical navigation bar

Postby rajmv on Thu Aug 11, 2011 3:42 am

Code: Select all
<html>
<head>
<style type="text/css">
#nav {
position: absolute;
top: 0px;
left: 0px;
}

#nav_side {
background-image: url(images\layout\Side_nav.gif);
background-repeat: no-repeat;
background-position: top center;
width: 36px;
height: 594px;
}

#buttons {
position: absolute;
background-repeat: no-repeat;
background-position: top center;
top: 500px;
left: 36px;
}
#nav_home {
background-image: url(images\layout\Home.gif);
background-repeat: no-repeat;
background-position: top center;
position: absolute; top: 552px; left: 35px;
width: 67px;
height: 14px;
}
#nav_Portfolio {
background-image: url(images\layout\Portfolio.gif);
background-repeat: no-repeat;
background-position: top center;
position: absolute; top: 566px; left: 35px;
width: 67px;
height: 14px;
}
#nav_Contact {
background-image: url(images\layout\contact.gif);
background-repeat: no-repeat;
background-position: top center;
position: absolute; top: 580px; left: 35px;
width: 67px;
height: 14px;
}
</style>
</head>
<body>

<div id="buttons">
</div>


<div id="nav">
<img src="images/layout/images/Side_nav.png"/>
</div>
<div id="nav_Home">
<img src="images/layout/images/Home.png"/>
</div>
<div id="nav_Portfolio">
<img src="images/layout/images/Portfolio.png"/>
</div>
<div id="nav_Contact">
<img src="images/layout/images/Contact.png"/>
</div>

</body>
</html>
rajmv
100+ Club
 
Posts: 103
Joined: Thu Jul 14, 2011 7:22 am


Who is online

Users browsing this forum: No registered users and 2 guests