rather annoying white space between anchor tags!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bennyChidge
Forum Newbie
Posts: 17
Joined: Fri Sep 19, 2008 4:40 pm

rather annoying white space between anchor tags!

Post by bennyChidge »

Any ideas how to get rid of the really annoying white space between the anchor tags - I think its a carraige return because if I group all the anchors together it works as i want it to (but then i cant read it code wise)

like this:

Code: Select all

<a href="blah" class="change_link">blah</a><a href="blah_two" class="change_link">blah2</a><a href="blah_three" class="change_link">blah3</a>
But html doesnt render carraige returns/whitespace?



heres the html contained in a php file

Code: Select all

<a href="blah" class="change_link">blah</a>
<a href="blah_two" class="change_link">blah2</a>
<a href="blah_three" class="change_link">blah3</a>

and the css

Code: Select all

.change_link {
    position:relative;
    top:0px;
    left:70px;
    background-color:#cccccc;
    z-index:3;
    font-size: 0.8em;
    line-height:12pt;
    padding:4px 5px 5px;
    color:#4b4b4b;
    margin:0;
    border:1px solid #cccccc;
    border-bottom:1px solid #a09f9f;
}
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: rather annoying white space between anchor tags!

Post by aceconcepts »

trim(), str_replace().

How are you storing and outputting the links?
bennyChidge
Forum Newbie
Posts: 17
Joined: Fri Sep 19, 2008 4:40 pm

Re: rather annoying white space between anchor tags!

Post by bennyChidge »

User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: rather annoying white space between anchor tags!

Post by aceconcepts »

My mistake, i thought you needed PHP help.
Post Reply