Making an image a link adds whitespace I can't get rid of

This is a discussion on "Making an image a link adds whitespace I can't get rid of" within the Web Page Design section. This forum, and the thread "Making an image a link adds whitespace I can't get rid of are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 18th, 2006, 08:01
New Member
Join Date: Aug 2006
Location: New Orleans
Age: 22
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Making an image a link adds whitespace I can't get rid of

Ok, I'm not really sure how to describe this, so I'll just show an example.

Check out this:
http://www.l4eclan.com/bipco/wtf1.htm
and
http://www.l4eclan.com/bipco/wtf2.htm

They are the exact same code, except that in the second one the buttons ('Products,' 'Services,' etc.) are linked somewhere. For some crazy reason, making them links adds whitespace around them that I can't seem to get rid of.

I have tried setting the border, margin, and padding of the <img>, <a>, and <li> tags to 0, to no avail. Can anyone tell me how to get rid of that damn whitespace? If I set the background color of the <a> tags to blue, it makes the whitespace blue... if that helps any. If I make the border, margin, or padding colors of those same tags blue, it doesn't show up. Weird.

Any ideas?
Reply With Quote

  #2 (permalink)  
Old Aug 18th, 2006, 08:13
Reputable Member
Join Date: Jul 2006
Location: Scotland
Age: 22
Posts: 357
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to snow
Re: Making an image a link adds whitespace I can't get rid of

have you tried:

"border-collapse:collapse;" ?

Sounds like it could work based on what you've described...


Snow
Reply With Quote
  #3 (permalink)  
Old Aug 18th, 2006, 14:12
Most Reputable Member
Join Date: Apr 2006
Location: Cornwall, UK
Posts: 1,310
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to ukgeoff
Re: Making an image a link adds whitespace I can't get rid of

Even though your are experimenting, you should still put you code in a properly structured html page.

I.e., DOCTYPE, etc, otherwise the browser is making a guess at how to interpret things.

Seperate your css into its own file.
Reply With Quote
  #4 (permalink)  
Old Aug 18th, 2006, 16:10
Rob's Avatar
Rob Rob is offline
Head Admin & CEO

SuperMember
Join Date: Jul 2003
Location: at my desk
Age: 34
Posts: 2,952
Blog Entries: 7
Thanks: 7
Thanked 4 Times in 4 Posts
Send a message via MSN to Rob Send a message via Skype™ to Rob
Re: Making an image a link adds whitespace I can't get rid of

just lose the whitespace in the source between the a tags and the li tags.

Lost the source formatting and bunch it up.... you should find your problem has gone.
__________________
Rob - SEO Specialist
Owner & Founder of Webforumz.com

I am currently unavailable for private work
Reply With Quote
  #5 (permalink)  
Old Aug 18th, 2006, 20:07
Junior Member
Join Date: Dec 2005
Age: 25
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Making an image a link adds whitespace I can't get rid of

ive had that problem before and i used hspace:0px; and it got rid of it in ie
Reply With Quote
  #6 (permalink)  
Old Aug 18th, 2006, 22:38
New Member
Join Date: Aug 2006
Location: New Orleans
Age: 22
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Making an image a link adds whitespace I can't get rid of

I figured out the problem. There was a style that was meant to be applied to something else but was getting applied to those images. Thank for the help though .
Reply With Quote
Reply

Tags
making, image, link, adds, whitespace, rid

Thread Tools

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 On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a link non-link when on the page. mcdanielnc89 Web Page Design 1 Nov 16th, 2007 08:05
Problem with navbar background image - hyperlinking whitespace nicky77 Web Page Design 5 Aug 23rd, 2007 14:39
making an entire div a link johnmr Web Page Design 3 Sep 21st, 2006 00:15
Making a link live in a cdo email weezie Classic ASP 0 Feb 15th, 2006 14:49
making a graphic signature a link question NovaGoth Graphics and 3D 1 May 2nd, 2005 09:16


All times are GMT. The time now is 16:27.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43