![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: May 2004
Posts: 2
Rep Power: 0
![]() |
#leftbutton {
text-align: center;
width: 10em;
padding: 0;
font-family: Arial, sans-serif;
}
#leftbutton ul {
list-style: none;
margin: 0;
padding:0;
border: none;
}
#leftbutton li {
margin: 0;
padding: 0 0 5px 0;}
#leftbutton li a {
margin-left: auto;
margin-right: auto;
display: block;
padding: 5px 5px 5px 5px;
text-decoration: none;
width: 80%;
background-color: #f0fff0;
color: #808080;
border-style: solid;
border-width: 1px;
border-color: #808080;
}
#leftbutton li a:hover {
background-color: #98FB98;
color: #808080;
}
#rightbutton{
text-align: center;
padding: 0;
margin: 0;
font-family: Arial, sans-serif;
}
#rightbutton ul {
list-style: none;
margin: 0;
padding:0;
border: none;
}
#rightbutton li {
margin-left: auto;
margin-right: auto;
margin-bottom: 5px;
display: block;
padding: 5px 5px 5px 5px;
width: 80%;
background-color: #dcdcdc;
color: #dcdcdc;
border-style: solid;
border-width: 1px;
border-color: #808080;
}
#rightbutton li a {
text-decoration: none;
color: #dcdcdc;
}
#rightbutton li a:hover {
padding: 5 5 5 5;
background-color: #ffdab9;
color: #808080;
}leftbutton is the way of creating mouse over buttons that everyone seems to use. It works great. Right button is the way I'd like to set it up. This way, can use <a> as a a 'class' of it's own. The goal is to have buttons not being used greyed out, like the disabled attribute. Obviously, leftbutton works. rightbutton works exactly the same, with one small exception: the hover background color doesn't go all the way to the left and right of the button. It fills to the top and bottom just fine, but not left and right. I've tried adjusting the padding and margins, but to no avail. I've tried adjusting the width arguement, but that doesn't seem to work either. Any ideas? Jeremy |
|
|
|
|
|
#2 |
|
Newbie
Join Date: May 2004
Posts: 2
Rep Power: 0
![]() |
I wound up adding a class to <a> called inactive, like this:
leftbutton a.inactive {
...
...
}
leftbutton a.inactive:hover{
...
...
...
}This worked great, and I didn't need all the rightbutton junk anymore. I didn't realize that you could add classes to a:xxx. I love CSS, it never stops amazing me! Jeremy |
|
|
|
|
|
#3 |
|
PFO Founder
![]() ![]() |
cool. one of these days i will have to look into css because i have heard so many great things about it. i have used it alittle but not much i have tryed it and thats about it but it was pretty cool.
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#4 |
|
Newbie
Join Date: Jun 2004
Posts: 1
Rep Power: 0
![]() |
I think it's just easyer to use instead of adding effects to every single page
just saves you time :-D |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I recommend learning it ASAP - eventually support for standard HTML will become depreciated, and XHTML will be the only code supported. Which means you have to learn CSS.
I recommend http:/www.yourhtmlsource.com/ - it's brilliant. I managed to create a fully functioning web page, with JavaScript menus and everything, using only that site. And it's proper XHTML, as approved by http://validator.w3.org/. |
|
|
|
|
|
#6 |
|
Programmer
|
Glad that you got your problem solved, and yes, anyone who doesn't know CSS really should get on that ASAP. There is so much that you can do with it, and it deffinately saves time. In fact, I have a couple of different external CSS files that I keep on hand, this way, I can test the layout and design of any new project I start and not have to worry about messing with changing the attribute of each of the HTML tags.
It is the best time saver ever. I do want to comment though, this whole XHTML thing. I am just learning it, and it is great, though, I am still in the begining stages. I think this whole thing is funny though on some level. A lot of folks are saying HTML will soon be out and XML will be in. Actually, XHTML is the transition between HTML and XML. I don't think that is very accurate, all the major browsers, currently support HTML, and if we remember that Javascript, supposedly was going to no longer be supported once html came out. And in all this time, javascripts funcionality has been inhanced. I think, HTML will continue to be suported by all the major browsers, at least for the rest of my life.. lol.. But deffinately... CSS is the best thing ever for saving time. Mike
__________________
Here's my latest project still in the works, and I need to get rid of this "frame" situation for real. www.prideofaustin.com |
|
|
|
|
|
#7 |
|
Programming Guru
![]() ![]() |
CSS is one of the greatest things to hit the internet since the webpage. It makes you site quick and pretty.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#8 |
|
Programming Guru
![]() |
Also if you do pure CSS layout you can have 3 or 4 templates and let teh user decide which one they would like to use.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|