Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Is my padding adding space to my images?
Old 04-02-2009, 08:35 PM Is my padding adding space to my images?
Junior Talker

Posts: 3
Name: jrod
Trades: 0
I am working on making some changes to my navigation bar. there are 8 images and when I place them, there are 4 pixels of space between each image. (i counted pixels using photoshop) have also attached a screenshot.
The confusing part to me is that there is no reference in my CSS file to anything taht is "4px".
Here is the link of code from the html file:

<div id="framenavbar"> <a onClick="return clickreturnvalue()" onMouseover="dropdownmenu(this, event, menu1, '150px')" onMouseout="delayhidemenu()"><asp:image runat="server" id="ServicesButton" ImageUrl="~/images/ServicesButton.png" url="~/offerings.aspx"/></a>
And here is the CSS for the two id's in the HTML:

#framenavbar{ float: none; width: 850px; height: 35px; background-repeat: no-repeat; padding: 0px; margin: 0px;/* IE6 and 7 Hack to give 3px spacing between navbar and rotator */ *margin-top: -3px; }/* Nav Buttons spacing fix for firefox */.navbutton{ padding-right: 1px; *padding-right: 0px; }
Any help is greatly appreciated, I have been trying to figure this one out for a long time!
Attached Images
File Type: jpg screenshot.jpg (11.0 KB, 3 views)
jrod11 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-02-2009, 09:18 PM Re: Is my padding adding space to my images?
NewBreed's Avatar
Extreme Talker

Posts: 223
Name: Johnny
Location: Washington
Trades: 0
If you could just post the website so one could play and look at all your code it'd be very much appreciated. But if it isn't your code it could also be the fact that you have some white space in your images causing an illusion of padding.
NewBreed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2009, 12:49 PM Re: Is my padding adding space to my images?
Junior Talker

Posts: 3
Name: jrod
Trades: 0
Here is a link to the page:

http://www.healthlinesystems.com

Thanks for the suggestions!
jrod11 is offline
Reply With Quote
View Public Profile
 
Old 04-03-2009, 01:35 PM Re: Is my padding adding space to my images?
NewBreed's Avatar
Extreme Talker

Posts: 223
Name: Johnny
Location: Washington
Trades: 0
Your images are being spaced by default on all browsers because you haven't told them what it is you want from them. Add this with your code:

.navbutton img {
margin:0;
padding:0;
float: left;
}

You need to fix the position after that, I would've but I got to be at school soon. Hope this fixes your problem!
Also you have 2 of the same css stylesheets that would be nice if you could get rid of one.
NewBreed is offline
Reply With Quote
View Public Profile
 
Old 04-03-2009, 02:09 PM Re: Is my padding adding space to my images?
Junior Talker

Posts: 3
Name: jrod
Trades: 0
Dude you are the man! It helped out my nav bar and i got it the way I want. The only problem is that for some reason it applied it to another part of my page and moved some of my borders of the page which are images. Your help was awesome, let me know if you have any suggestions on how to make it only apply to the navigation images.

Thanks!
jrod11 is offline
Reply With Quote
View Public Profile
 
Old 04-03-2009, 03:02 PM Re: Is my padding adding space to my images?
NewBreed's Avatar
Extreme Talker

Posts: 223
Name: Johnny
Location: Washington
Trades: 0
Well I haven't looked at the code but that means you have other parts of your html wrapped in the same div. So just wrap the other code that is not in your nav in a different div... Know what I mean?
NewBreed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Is my padding adding space to my images?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23541 seconds with 13 queries