36 users online (0 members and 36 guests)  


  Results 1 to 10 of 10

Related

  1. Change color of only one link    Forum: CSS Forum
    Replies: 3
  2. CSS text color    Forum: CSS Forum
    Replies: 10
  3. how to set color for textbox    Forum: HTML Forum
    Replies: 2
  4. Replies: 5
  5. Link Color    Forum: General Discussion
    Replies: 4
  1. #1
    adamsen's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Denmark
    Posts
    128

    Link color around images

    I have a little problem with my website.
    I made some img links(<a><img></a>), but when I
    tested he page in IE6 and 7, there appeared some
    blue lines in the border of the images. I know how to
    remove these with the LINK-attribute in the <body>-section,
    but I want to remove them with CSS, because it
    not have to apply to the hole page, so im thinking im
    going to use the <div>-tag. Is that right, and what
    do I have to write in the css-section in the head
    (please show me all I have to do, im
    beginner)?

  2. #2
    jthayne's Avatar

    Status
    Offline
    Join Date
    Aug 2008
    Location
    Texas
    Posts
    508

    Re: Link color around images

    Go to w3schools to find out how to create a CSS file. The code you are looking for for your purpose is:

    Code:
    a { border: none; }

  3. #3
    adamsen's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Denmark
    Posts
    128

    Question Re: Link color around images

    Thanks, but was I right about the use of the div-tag: Text and tags between these div-tags can be controlled with stylesheets?
    Last edited by adamsen; 01-30-2009 at 02:59 PM. Reason: Have to be some more

  4. #4
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Link color around images

    Quote Originally Posted by adamsen View Post
    Thanks, but was I right about the use of the div-tag: Text and tags between these div-tags can be controlled with stylesheets?
    You can control all your elements with CSS.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  5. #5
    adamsen's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Denmark
    Posts
    128

    Re: Link color around images

    Ok, but what is the idea with the div-tag?

  6. #6
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Link color around images

    From the word itself...it defines a division or section in an HTML document.

    For further reading:
    http://www.w3schools.com/tags/tag_DIV.asp
    http://www.devarticles.com/c/a/HTML/...-tags-Quickly/
    http://www.quackit.com/html/tags/html_div_tag.cfm

    Hope that helps.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  7. #7
    adamsen's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Denmark
    Posts
    128

    Re: Link color around images

    Allright, now I can see it.

  8. #8
    adamsen's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Denmark
    Posts
    128

    Re: Link color around images

    It will not work, ther is still blue borders around the images:

    HTML Code:
    <html>
    <head><title>Reservering - Trin 2</title><style type="text/css">a {borders:none;text-color:white;}</style></head>
    
    <body>
    
    
    <table border=0>
    		<tr width=230>
    		<td>
    <!--//Menubar Begynder//-->
    		<br></td><td width=100%><h1 style="font-size:400%" align="center">Reservering - Trin 2</h1>	</td></tr></td></tr></tr><td>
    		<td height=400 rowspan=2>
    <!--//Menubar ender//--><h1 style="font-size:300%" align="center">Januar</h1><center><table><tr><td><a <a class="noblueborders"  href="../../kalender/soveværelse/januar.html"><img name=b1 src="../../billeder/januard.png" onmousedown=document.b1.src="../../billeder/januard.png" onmouseup=document.b1.src="../../billeder/januar.png"><a <a class="noblueborders"  href="../../kalender/soveværelse/februar.html"><img name=b2 src="../../billeder/februar.png" onmousedown=document.b2.src="../../billeder/februard.png" onmouseup=document.b2.src="../../billeder/februar.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/marts.html"><img name=b3 src="../../billeder/marts.png" onmousedown=document.b3.src="../../billeder/martsd.png" onmouseup=document.b3.src="../../billeder/marts.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/april.html"><img name=b4 src="../../billeder/april.png" onmousedown=document.b4.src="../../billeder/aprild.png" onmouseup=document.b4.src="../../billeder/april.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/maj.html"><img name=b5 src="../../billeder/maj.png" onmousedown=document.b5.src="../../billeder/majd.png" onmouseup=document.b5.src="../../billeder/maj.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/juni.html"><img name=b6 src="../../billeder/juni.png" onmousedown=document.b6.src="../../billeder/junid.png" onmouseup=document.b6.src="../../billeder/juni.png"></a><br><a <a class="noblueborders"  href="../../kalender/soveværelse/juli.html"><img name=b7 src="../../billeder/juli.png" onmousedown=document.b7.src="../../billeder/julid.png" onmouseup=document.b7.src="../../billeder/juli.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/august.html"><img name=b8 src="../../billeder/august.png" onmousedown=document.b8.src="../../billeder/augustd.png" onmouseup=document.b8.src="../../billeder/august.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/september.html"><img name=b9 src="../../billeder/september.png" onmousedown=document.b9.src="../../billeder/septemberd.png" onmouseup=document.b9.src="../../billeder/september.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/oktober.html"><img name=b10 src="../../billeder/oktober.png" onmousedown=document.b10.src="../../billeder/oktoberd.png" onmouseup=document.b10.src="../../billeder/oktober.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/november.html"><img name=b11 src="../../billeder/november.png" onmousedown=document.b11.src="../../billeder/novemberd.png" onmouseup=document.b11.src="../../billeder/november.png"></a><a <a class="noblueborders"  href="../../kalender/soveværelse/december.html"><img name=b12 src="../../billeder/december.png" onmousedown=document.b12.src="../../billeder/decemberd.png" onmouseup=document.b12.src="../../billeder/december.png"></a><h3 align=center>De farvede datoer er reserverede!</h3><table border=0><tr><td width=73></td><td></td></tr><tr><td width=73  ></td><td></td></tr><tr><td width=73></td><td></td></tr></table><br><table border=1 width=438 height=170>
    <tr><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td></tr>
    
    <tr><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr>
    
    <tr><td>13</td><td>14</td><td>15</td><td>16</td><td>17</td><td>18</td></tr>
    
    <tr><td>19</td><td>20</td><td>21</td><td>22</td><td>23</td><td>24</td></tr>
    
    <tr><td>25</td><td>26</td><td>27</td><td>28</td><td >29</td><td>30</td></tr>
    
    <tr><td>31</td><td></td><td></td><td></td><td></td><td></td></tr>
      
    </td></tr></table></center>
    
    <!--//Site begynder//-->			</td></tr><tr height=><td height=></td></tr>
    		</table>
    <!--//Site ender//-->  
    
    	
    
    
    
    </body>
    </html>	

  9. #9
    rangana's Avatar
    Moderator/Allstar

    Status
    Offline
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    317

    Re: Link color around images

    Your CSS is erroneous:
    • There is no borders property, but border instead.
    • There is no text-color property, but color instead.


    Also, if you want to remove the borders around the images, you should add a rule on your CSS that will target the img element:
    Code:
    img{
    border:none;
    }
    Hope that helps.
    Checkout my porfolio.
    Please click the button when a member helped you.
    Take time to use Forum's Search function.

  10. #10
    adamsen's Avatar
    Senior Member

    Status
    Offline
    Join Date
    Jan 2009
    Location
    Denmark
    Posts
    128

    Re: Link color around images

    Thanks, the IMG-css worked. You don´t know what a big help you have been, that was maybe the only problem on me website. Thanks!



Tags for this Thread