mike12255 Posted February 10, 2009 Share Posted February 10, 2009 I got the following code displaying an image: $result = mysql_query($query) or die(mysql_error()); $record = mysql_fetch_assoc($result); // if ($record['locked'] < 1 || ($session->isAdmin())) { print "<a href= 'reply.php' ><img src='images/reply-btn.gif' width='100' height='32'></a>"; } if($session->isAdmin()) { and for some reason a blue box appears around my gif (as can be seen at http://schoolworkanswers.com/message.php?id=1) anyone know why P.S how do i turn on error reporting in php? Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/ Share on other sites More sharing options...
The Little Guy Posted February 10, 2009 Share Posted February 10, 2009 this is a css problem... img{border:0;} Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759186 Share on other sites More sharing options...
mike12255 Posted February 10, 2009 Author Share Posted February 10, 2009 ARH! here is my .css: body { a:link, a:visited, a:active { text-decoration: none} font-family:Verdana, Sans-serif; color; #000000; font-size: 12px } input,textarea, select,{ color : #000000; font: normal 12px; border-collapse: collapse; border: 1px solid #000000; } img{ border:0; } .maintable {border: 0px ; width: 100%; padding: 0px; background-color: #FFFFFF} /*main table for forum*/ .regrow {font-family: Verdana,Sans-serif; color: #000000; font-weight: bold; background-color: #FFFFFF;font-size: 12px;} /*registration row, mainly here for symetry*/ .headline {font-family: Verdana,Sans-serif;font-weight: bold;color: #FFFFFF;background-color: #003366;font-size: 11px;} /*headline row, the first row that says forum name, topics, posts and such*/ .forumrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 12px;} /*color of the forum rows*/ .mainrow a:link, a:visited, a:active { text-decoration: none;} .mainrow {font-family: Verdana,Sans-serif; color: #000000;background-color: #F2F2F2;font-size: 12px; a:link, a:visited, a:active { text-decoration: none}} /*color of the forum rows*/ .maintables{background-color: #FFFFFF; width: 85%; padding: 0px; border: 3px solid; cellspacing: no} /*main table for forum*/ ---> and i've linked the message.php file to it: print "<link rel='stylesheet' href='style.css' type='text/css'>"; but i still got the box??? Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759187 Share on other sites More sharing options...
The Little Guy Posted February 10, 2009 Share Posted February 10, 2009 That file doesn't exist. http://schoolworkanswers.com/style.css And that link should be in your head, not your body. Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759194 Share on other sites More sharing options...
premiso Posted February 10, 2009 Share Posted February 10, 2009 Or you can define the border attribute inside the <img tag. print "<a href= 'reply.php' ><img border='0' src='images/reply-btn.gif' width='100' height='32'></a>"; Or try changing border of 0 to be: img{ border:none; } And see what that produces, this will effect every image on your site, however. Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759195 Share on other sites More sharing options...
mike12255 Posted February 10, 2009 Author Share Posted February 10, 2009 its in a css folder, thats why you cant find it, it's always worked that that before, ill try it at top and with none in a couple mins Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759201 Share on other sites More sharing options...
The Little Guy Posted February 10, 2009 Share Posted February 10, 2009 so.. change this: print "<link rel='stylesheet' href='style.css' type='text/css'>"; to this: print "<link rel='stylesheet' href='/css/style.css' type='text/css'>"; Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759203 Share on other sites More sharing options...
mike12255 Posted February 10, 2009 Author Share Posted February 10, 2009 thanks mates! it now looks normal. Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759210 Share on other sites More sharing options...
The Little Guy Posted February 10, 2009 Share Posted February 10, 2009 You got it! Now I would just recommend moving the link to the CSS to your head tag. Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759217 Share on other sites More sharing options...
mike12255 Posted February 10, 2009 Author Share Posted February 10, 2009 yeah did that already, P.S i know this is a css question but i dont want to have to create another thread just for it, is it possible to use css to make post 1 box a certian color and post 2 box another color? Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759227 Share on other sites More sharing options...
The Little Guy Posted February 10, 2009 Share Posted February 10, 2009 yeah. Example CSS: #box1{background-color:#000} #box2{background-color:#F00} Example HTML: <input type="text" id="box1" name="box1" /><br /> <input type="text" id="box2" name="box2" /> Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759232 Share on other sites More sharing options...
mike12255 Posted February 10, 2009 Author Share Posted February 10, 2009 ok, thanks. Link to comment https://forums.phpfreaks.com/topic/144684-solved-blue-box-around-my-image/#findComment-759256 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.