Jump to content
rootKID

shoutbox image border trouble Oo...

Recommended Posts

ok, i have been having this kind of trouble before as i remember, but i cannot remember how to fix it inside the freaking css, lol -.-'. i have been developping a shoutbox to my forum im also developping in a later point.anyways, i have attached a pic to the post here... you can see i have a little annoying blue under-score line besides the pictures in the shoutbox, and i can't simply remember how to remove them.. the shoutbox is comming out in a (<iframe>) tag.. no clue if that is why, but as i also remember, then inside the css, i just needed to write this: img { border:0px;} please tell me, am i wrong as usually, or is there an another way.. the pics are freaking me out, and i have tried anything.. also tried to add a class to the pics, but nothing is happening to them OO'... this is how i take them out to the shoutbox: EXAMPLE:

$del = ( $CURUSER['class'] >= UC_MODERATOR ? "<a href='shoutbox.php?del=" . $arr['id'] . "'>  <img src='pics/shout/del.png' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a> " : "" );

and then i echo out the $del variable later on... ideas?...

Share this post


Link to post
Share on other sites

Is it because you are stacking them

<a href='shoutbox.php?del=" . $arr['id'] . "'>  <img src='pics/shout/del.png' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a>

instead of

<a href='shoutbox.php?del=" . $arr['id'] . "'><img src='pics/shout/del.png' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a>

stacking them causes a newline, which then is displayed as a space, and because there is a space, the anchor produces a default underline to go with that space. you should just need to remove the underline for that anchor element, by giving it a class name

<a href='shoutbox.php?del=" . $arr['id'] . "' class="myanchoreclass">

.myanchoreclass {text-decoration: none;}

Share this post


Link to post
Share on other sites

hmm.. you were right, it was because i stacked them. but just to clarifie till next time, how can i avoid this is i would like to stack them?..just that i think for my own sick that i have a better overview of the coding if i stack them. maybe just me, but is it possible to avoid this problem?.. i tried your css by the way. did not work. here is my while code that grabs everything i need to the shout:

while ( $arr = mysql_fetch_assoc( $res ) ){   if($arr['pms'] > 0 && $gotpm == 0)   {    $HTMLOUT .= '	 <tr>	  <td align=\'center\'>	   <a href=\'messages.php\' class=\'shoutbox_row1\' target=\'_parent\'>		 You have '.$arr['pms'].' new private message'.($arr['pms'] > 1 ? 's' : '').'	   </a>	  </td>	 </tr>';    $gotpm++;   }$del = ( $CURUSER['class'] >= UC_MODERATOR ? "<a href='shoutbox.php?del=" . $arr['id'] . "'><img src='pics/shout/del.png' border='0' alt=\"Delete Single Shout\" title=\"Delete Single Shout\" /></a> " : "" );$pm = "<span class='date'>  <a target='_blank' href='./sendmessage.php?receiver=$arr[userid]'><img src='pics/shout/button_pm.gif' border='0' alt=\"Pm User\" title=\"Pm User\" /></a></span>\n";$delall = ( $CURUSER['class'] >= UC_SYSOP ? "[<a href='shoutbox.php?delall' class='shoutbox_row1' onclick=\"confirm_delete(); return false;\">  Empty Shout!</a>]" : "" );  //$date = get_date($arr["date"], 0,1);  $who_shouted_this_one = $arr['username'].":";$HTMLOUT .= "<tr bgcolor='$bg'>  <td>  <span class='shoutbox_text_color'>   ".$who_shouted_this_one." $pm $del   ". format_comment( $arr["text"] ) . "  </span>  </td></tr>\n";}//Ending While-Loop here...    $HTMLOUT .="</table>";

i have fixed the stacking for now, but just to know how to fix till next time. ideas?....

Share this post


Link to post
Share on other sites

(1) Unless you are referencing a anchor link through a id ref somewhere as in

#myid a {text-decoration: underline;} 

this will have a higher precedence over .myanchoreclass {text-decoration: none;}

<div id="myid"> <a href="#">link 1</a><a href="# class="myanchoreclass">link 1</a></div>

you can only give it a higher precedence by including the id ref

#myid a.myanchoreclass {text-decoration: underline;} 

(2) To still use stacking, try using float for the image, you will have to add a margin to image, to replace the gap, that was caused originally by spaces, either side of image.

Share this post


Link to post
Share on other sites

hmm, thanks for the answer. will try to do it your way as you just said, for fun. then i have the solution for an another time :). -thanks!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...