Don't really knew where to post this cause i didn't saw a html/css section.
But my question/problem is I have a layer website
and in my menu i'm using buttons, <ul><li>
but I give the li a special id, the top one is <il id="head"> and it has another background-image as the other one but how can i put my text in the middle of it and set padding on it cause when i do some padding i get troubles :S
I hope you understand
ty in advance
css question/problem
Started by Nightscream, Dec 07 2006 02:19 PM
5 replies to this topic
#1
Posted 07 December 2006 - 02:19 PM
#2
Posted 07 December 2006 - 04:24 PM
You will have to give us a link/example of your problem and code so we can actually give you any information on how to fix it.
#3
Posted 07 December 2006 - 06:17 PM
ok this is just a piece of the code but i think that's all you need
this is the html
this the css
ty in advance
-- Nighstcream --
this is the html
<div id="sidebar"> <div id="leftnav"> <img src="images/deimon_network.gif" width="173" height="25" /> <ul> <li id="head">+ link</li> <li id="button">+ link</li> <li id="button">+ link</li> <li id="foot"></li> </ul> </div> </div>
this the css
#sidebar {
float: left;
width: 173px;
}
#sidebar #leftnav {
width: 173px;
overflow: hidden;
}
#sidebar #leftnav ul {
list-style: none;
width: 173px;
display: block;
margin: 0 0 0 0;
padding: 0 0 0 0;
overflow: hidden;
}
#sidebar #leftnav #head {
width: 173px;
height: 27px;
background-image: url(images/nav_head.gif);
background-repeat: no-repeat;
}
#sidebar #leftnav #button {
width: 173px;
height: 20px;
background-image: url(images/nav_but.gif);
background-repeat: no-repeat;
}
#sidebar #leftnav #foot {
width: 173px;
height: 20px;
background-image: url(images/nav_foot.gif);
}
ty in advance
-- Nighstcream --
#4
Posted 08 December 2006 - 03:09 PM
When you use an id it's supposed to be used only once per page. If you want to use something multiple times on a page make it a class. So for example, your button should be a class:
#sidebar #leftnav .button {
width: 173px;
height: 20px;
background-image: url(images/nav_but.gif);
background-repeat: no-repeat;
}
<li class="button">+ link</li>
#5
Posted 08 December 2006 - 04:30 PM
are you sure, it's in a stylesheet
and btw i need to get my text in the middle and with a little padding
but when i do so, my background of that ul just doesn't look good, it's moves
and btw i need to get my text in the middle and with a little padding
but when i do so, my background of that ul just doesn't look good, it's moves
Edited by Nightscream, 08 December 2006 - 04:32 PM.
#6
Posted 12 December 2006 - 03:52 PM
Never mind, i fixed it
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
