Welcome, Guest. Please login or register.
Did you miss your activation email?
May 27, 2012, 03:08:34 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155555 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Button Padding  (Read 1230 times)
Pmaurer

Offline Offline

Posts: 34


« on: April 30, 2008, 02:35:05 PM »

Argh, I would like to get rid of this annoying padding around the buttons that I put into the site...and i can't find the right padding code line in the style.css sheet of my template! I really either just want it gone or at least to make the padding black.
Logged
marathoner

Offline Offline

Posts: 495


« Reply #1 on: April 30, 2008, 02:58:38 PM »

You've got some pretty confusing CSS going on there, dude.

This is caused due to the default border around your button images...so you would need to style the IMG in your menu to have a border of 0px.

The border colors appear to be at:
a:link
#nav li a:hover

Just a suggestion...try FF with the Web Developer addon...this will allow you to see and alter CSS dynamically on your screen and see instant results (it also does many other useful things). This allows you to play with the CSS until you get it the way you want it before making changes to the actual CSS file.
« Last Edit: April 30, 2008, 03:01:51 PM by marathoner » Logged
Pmaurer

Offline Offline

Posts: 34


« Reply #2 on: April 30, 2008, 04:13:28 PM »

Well, when i change those color lines, nothing happens undecided......aaaand i can't find the addon with the FF you were talking about Sad
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #3 on: April 30, 2008, 04:27:31 PM »

Personally I like Firebug more. (I use them both)

Here are the developers websites:

Firebug: http://www.getfirebug.com/
Web Developer: http://chrispederick.com/work/web-developer/

Ruud
Logged

Professional WebsiteBaker Solutions
Pmaurer

Offline Offline

Posts: 34


« Reply #4 on: April 30, 2008, 09:16:23 PM »

okay, thanks! that definitely helped! But, one more problem. I got the buttons to just be black, how i want them, but now when i try the site in IE, all of them are PURPLE...undecided.............................................
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #5 on: April 30, 2008, 10:30:08 PM »

okay, thanks! that definitely helped! But, one more problem. I got the buttons to just be black, how i want them, but now when i try the site in IE, all of them are PURPLE...undecided.............................................

This is from your CSS (last line) seen with firebug  cool

Code:
#nav li a:link,#nav li a: visited {color:#fd15da;}

Remove the whitespace between a: and visited AND set the correct color. (#fd15da is purple, #000000is black)

Ruud
Logged

Professional WebsiteBaker Solutions
Pmaurer

Offline Offline

Posts: 34


« Reply #6 on: April 30, 2008, 10:45:44 PM »

Ugh, I did exactly what you said and it still is showing up as that stupid purple in IE :,(.
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #7 on: April 30, 2008, 11:17:03 PM »

Try moving them around a bit.

IE (and CSS) also have some issues in what order the rules are set.

Look here: http://www.w3schools.com/CSS/css_pseudo_classes.asp for some info on the ordering of a:something rules.

Ruud
Logged

Professional WebsiteBaker Solutions
Pmaurer

Offline Offline

Posts: 34


« Reply #8 on: April 30, 2008, 11:34:21 PM »

hmm, i tried moving that nav li ........  line around to different areas, to no avail....i dont understand where it could possibly be finding the purple color code in the file when there literally is no purple code..... undecided
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #9 on: April 30, 2008, 11:38:14 PM »

The withe hoover now works in Firefox.

I found something (google) on a IE/CSS bug with an image within an A link.

The solution should be to tell IE not to use borders, the a:something rule should handle that.
 
Code:
img {border:0 none;}


[edit] other option:
Code:
#nav li a:link img,#nav li a:visited img {color:#000000;}

[edit 2] next possible solution:
Code:
img  {border: 1px solid #000000;}
A:visited img    {border: 1px solid #000000;}
A:active img  {border: 1px solid #000000;}
A:hover img    {border: 1px solid #000000;}
(note the use of border instead of color)

Welcome to the wonderful world of CSS  smiley

Ruud
« Last Edit: April 30, 2008, 11:52:15 PM by RuudE » Logged

Professional WebsiteBaker Solutions
BerndJM

Offline Offline

Posts: 1764



« Reply #10 on: April 30, 2008, 11:51:51 PM »

Hi,

Quote
i dont understand where it could possibly be finding the purple color code in the file when there literally is no purple code

you cannot find the purple code, because this is the Standard HTML behavior:
non visited image-links have a blue border - visited image-links have a purple border
You have to tell the browser (via css) - overwrite this standard - either to use no border or the color you wish (see also the last post from RuudE)

Regards Bernd
Logged

In theory, there is no difference between theory and practice. But, in practice, there is.
Pmaurer

Offline Offline

Posts: 34


« Reply #11 on: April 30, 2008, 11:55:54 PM »

I tried this:
#nav li a:link, #nav li a:visited {color: #000000;img {border: 0 none;}
I also tried it in the other lines, but you weren't very specific as to where to actually put that img line into the code, any ideas? thanks!
Logged
BerndJM

Offline Offline

Posts: 1764



« Reply #12 on: May 01, 2008, 12:00:15 AM »

Just one idea:

write correct CSS-Syntax
Code:
#nav li a:link, #nav li a:visited {color: #000000;img {border: 0 none;}
will never be interpretet correctly by any browser
Maybe you want this:
Code:
#nav li a:link, #nav li a:visited {color: #000000;}
img {border: 0 none;}

Regards Bernd
Logged

In theory, there is no difference between theory and practice. But, in practice, there is.
Pmaurer

Offline Offline

Posts: 34


« Reply #13 on: May 01, 2008, 12:02:43 AM »

!!!  grin
thanks! looks beau-t-ful.
Logged
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #14 on: May 01, 2008, 12:04:43 AM »

Code:
img {border:0 none;}

Is a line itself. It tells the browser not to use any border around images.

These things are best learned by googeling and just trying.
Currently I am googeling, but unable to try and give a "tested" answer.

My previous post now has 3 options, I think the third one makes the most sense now.

For the rest: try things, by trying - learn about CSS, and you will solve it.

Ruud
Logged

Professional WebsiteBaker Solutions
Ruud
WebsiteBaker Org e.V.

Offline Offline

Posts: 2298



WWW
« Reply #15 on: May 01, 2008, 12:10:28 AM »

!!!  grin
thanks! looks beau-t-ful.

Cool, now I can go to sleep  smiley

Cheers

Ruud
Logged

Professional WebsiteBaker Solutions
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!