Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jun 8th, 2004, 11:02 AM   #1
jeremy1701
Newbie
 
Join Date: May 2004
Posts: 2
Rep Power: 0 jeremy1701 is on a distinguished road
#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
jeremy1701 is offline   Reply With Quote
Old Jun 9th, 2004, 7:54 AM   #2
jeremy1701
Newbie
 
Join Date: May 2004
Posts: 2
Rep Power: 0 jeremy1701 is on a distinguished road
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
jeremy1701 is offline   Reply With Quote
Old Jun 9th, 2004, 8:18 AM   #3
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,628
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
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.
big_k105 is offline   Reply With Quote
Old Jun 22nd, 2004, 11:25 AM   #4
dblbl
Newbie
 
Join Date: Jun 2004
Posts: 1
Rep Power: 0 dblbl is on a distinguished road
I think it's just easyer to use instead of adding effects to every single page

just saves you time :-D
dblbl is offline   Reply With Quote
Old Jul 12th, 2004, 7:02 AM   #5
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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/.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Sep 29th, 2004, 6:41 PM   #6
scorpiosage
Programmer
 
scorpiosage's Avatar
 
Join Date: Aug 2004
Location: Austin, Tx
Posts: 55
Rep Power: 4 scorpiosage is on a distinguished road
Send a message via AIM to scorpiosage Send a message via Yahoo to scorpiosage
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 &quot;frame&quot; situation for real. www.prideofaustin.com
scorpiosage is offline   Reply With Quote
Old Sep 29th, 2004, 6:56 PM   #7
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
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!
Pizentios is offline   Reply With Quote
Old Sep 30th, 2004, 2:16 AM   #8
Berto
Programming Guru
 
Join Date: Aug 2004
Posts: 1,022
Rep Power: 6 Berto is on a distinguished road
Send a message via AIM to Berto Send a message via MSN to Berto
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
Berto is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:01 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC