My last php question ever!

Permabanned
Joined
22 Apr 2007
Posts
1,805
In this code here:

Code:
echo "<h3>$obj->p_title</h3><strong>$obj->p_summary</strong><br /><a href='news.php?id=$obj->id'>(full story here)</a></p>";

All of the formatting follows my CSS (the '<h3>' for example displays correctly). However, the link doens't unless its clicked. On page load it appears as the garish purple underlined link.

If I wrap a <p> around it, it works, but obviously, I then get space which looks odd. If I put a <p> before the top of the PHP code and an ending </p> after the php code (but still within the divs) that doesnt work either.

Any ideas?

This is the DIV CSS for this part of the site
Code:
#left-content p a:link{		
color: #f20000;	
border-bottom: 1px dotted #f20000;	
border-left:0px;	
border-right:0px;	
border-top:0px;	
text-decoration:none;	
}	

#left-content p a:visited{		
color: #f20000;	
border-bottom: 1px dotted #f20000;	
border-left:0px;	
border-right:0px;	
border-top:0px;	
text-decoration:none;	
}	

#left-content p a:hover{		
color: #f20000;	
border-bottom: 1px dotted #000;	
border-left:0px;	
border-right:0px;	
border-top:0px;	
text-decoration:none;	
}			

#left-content a:active{		
color: #f20000;	
border-bottom: 1px dotted #f20000;	
border-left:0px;	
border-right:0px;	
border-top:0px;	
text-decoration:none;	
}
 
You've got no CSS specified for the a: pseudo's outside of p's.

You also have a closing </p> but no matching opening <p> (that we can see in your one line of code)
 
Back
Top Bottom