CSS - Text-decoration:none; Help
I'm making my images links, but I keep getting the blue and purple links around the images. I have the text-decoration:none; everywhere I can think. What am I doing wrong.
markrobinsondesign.com is my website so you can go and look at the source code. If you need me to post the code here let me know. Similar TutorialsPage coding: Code: <div class='btn'><div class='btntxt'><A HREF="#"><nobr>Harness in Art</nobr></A></div></div> <div class='btn'><div class='btntxt'><A HREF="#">Jewelry</A></div></div> <div class='btn'><div class='btntxt'><A HREF="#">Wearable</A></div></div> <div class='btn'><div class='btntxt'><A HREF="#">Decorative</A></div></div> <div class='btn'><div class='btntxt'><A HREF="#">Glass</A></div></div> <div class='btn'><div class='btntxt'><A HREF="#"><nobr>More Fun</A></nobr></div></div> CSS coding Code: .btn { float: left; width:80px; min-width:40px; max-width:129px; height: 42px; margin: 2px; padding: 3px 3px 2px 34px; border-bottom: 4px solid #<?= $basea->bg['-1'] ?>; border-left: 3px solid #<?= $basea->bg['+3'] ?>; border-right: 4px solid #<? echo $darka; ?>; border-top: 3px solid #<?= $basea->bg['+4'] ?>; background: #<?=$basea->bg['+2']; ?> url(images/LinkBtnTN.jpg) 0 0 no-repeat; } .btntxt { float: left; width: 100%; height: 100%; margin: 0; padding: 15px 0 0 0; } .btntxt a:link {color: #<?= $baseb->bg['+5'] ?>; text-decoration: none;} .btntxt a:hover {color: #<?= $basea->bg['+5'] ?>; text-decoration: none;} Ignore the embedded PHP, please. Why does the hover work and the a:link not? This is driving me nuts! Everything else rocks. Thanks. HeadElf I am having an issue with my text decoration for a link in a unordered list not being declared correctly. I have set the href link to text-decoration: none value, but it is still getting the declaration from the #gt_links tag. Why isn't it picking up the #gt_links li a tag. here is the code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>NONE</title> <style> #gt_links { position: relative; top: 139px; height:auto; width: 138px; margin: auto; font-size: 12px; font-weight:bold; color: #ffcc66; text-decoration: underline; // believe is culprit margin-top: 5px; } #gt_links li, ul { margin: 0; padding: 0; list-style: none; text-decoration:none; } #gt_links li a { display: inline; position: relative; font-size: 10px; font-weight: normal; text-decoration: none; color: #ffcc66; } #gt_links a { display: inline; position: relative; font-size: 10px; font-weight: normal; text-decoration: none; color: #ffcc66; } #gt_links a:hover{background:none;text-decoration:none;} #gt_links li:hover{background:url(http:/static.grepolis.com/images/game/layout/menu_hover.png)no-repeat;} </style> </head> <body> <div id="gt_links">Grepolis Tools <ul> <li><a id="w_pref" href="#">Preferences</a><span style="color:#FFCC66;"> | </span><a id="w_help" href="#">Help</a></li> <li><a id="w_toggle" href="#">Show/Hide</a></li> </ul> </div> </body> </html> Yes I know if you pull it up it is very ugly. This is just the part of a page which is relative to my issue. Please help. Thanks How do I remove the text decoration (make underline invisible) in table by CSS? text-decoration: none; cannot work in my CSS..... <style type="text/css"> table { font-family: Verdana; font-size: 12px; text-decoration: none; } </style> hi, i would like the underline of my top level links to be as wide as the naviagtion box, it is currently only streching to the end of the text itself PHP Code: <ul> <li><a href="?action=abouUs">about us</a> <ul> <li><a href="?action=press">press</a></li> <li><a href="?action=tellFriend">tell a friend</a></li> <li><a href="?action=feedback">feedback</a></li> </ul> </li> <li><a href="?action=new">fitting room</a></li> <li><a href="?action=offers">best sellers</a></li> <li><a href="?action=col">useful info</a> <ul> <li><a href="?action=pay">payment options</a></li> <li><a href="?action=delCharge">delivery charges</a></li> <li><a href="?action=retPol">returns policy</a></li> </ul> </li> </ul> PHP Code: /* LEFT NAV */ #leftNav { color: #000; float: left; margin: 0; padding: 0; width: 128px; } #leftNav a { border-bottom: 1px solid #000; text-decoration: none; width: 120px; } #leftNav ul li ul a { border-bottom: none; } #leftNav ul { list-style: none; margin: 0; padding: 10px 0 0 10px; display: block; border: none; } #leftNav ul li { margin: 0; padding: 0 0 10px 0; width: 110px; font-size: 14px; font-weight: bold; } #leftNav ul li ul { margin: 0; padding: 5px 0 0 10px; } #leftNav ul li ul li { margin: 0; padding: 0; list-style: none; font-size: 12px; font-weight: 300; width: 95px; } /* END OF NAV */ thanks for your help I have: td.a1 { background-color: white; color: #003399; width: 120px; height: 30px; font-family: "MS Verdana", sans-serif; font-size: 25px; font-weight: bold; text-align:center; } how do I alter so I can hyperlink the text spanned by the above so that no usual underlines, change of color etc. occur when the text is hovered, clicked. The below added to the css above doesn't work... link text-decoration: none; visited text-decoration: none; active text-decoration: none; hover text-decoration: none ie: td.d0 { background-color: white; color: #003399; width: 120px; height: 30px; font-family: "MS Verdana", sans-serif; font-size: 25px; font-weight: bold; text-align:center; link text-decoration: none; visited text-decoration: none; active text-decoration: none; hover text-decoration: none } doesn't stop the underlining, change of color etc. Hello, more issues(!) I'm using "text-decoration: line-through" to cross out retail prices - catalogue style. The trouble is, when the effect is used with certain numbers like "8" and "3", the numbers become unreadable and it looks like we're charging more than the retail price on some products. My boss likes the effect, so I need to find out how to raise the height of the line-through. Does anyone know how I can do this, or any other methods (such as border control) that will be more effective. Many thanks! Not sure if I'm missing something or if there's a hack for FF (and possibly other browsers), but on hover, text-decoration:underline doesn't seem to work in FF. Here's the HTML: Code: <div class="prod_container"> <div class="leftprods"> <div style="text-align:center; margin:auto;"><a href="#"><img src="images/prod_ta.gif" style="border:0;" alt="Time and Attendance" /><div class="prod_text">Time and Attendance</div></a></div><div> </div> <div style="text-align:center; margin:auto;"><a href="#"><img src="images/prod_devkit.gif" style="border:0" alt="Development Kits" /><div class="prod_text">Development Kits</div></a></div> </div> <div class="rightprods"> <div style="text-align:center; margin:auto;"><a href="#"><img src="images/prod_access.gif" style="border:0" alt="Access Control" /><div class="prod_text">Access Control</div></a></div><div> </div> <div style="text-align:center; margin:auto;"><a href="#"><img src="images/prod_finger.gif" style="border:0" alt="Fingerprint Readers" /><div class="prod_text">Fingerprint Readers</div></a></div> </div> </div> Here's the CSS: Code: .leftprods { text-align:left; float:left; } .leftprods a{ text-decoration:none; color:green; } .rightprods { text-align:left; float:right; } .rightprods a{ text-decoration:none; color:green; } .prod_text { font-size:16px; color:green; font-weight:bold; padding-bottom:5px; } .prod_container a:hover { text-decoration:underline; } Thanks. To emphasis a link I put a small image (its an "X") before the link. See attached picture. GOOD this works well for text links: Code: <a href="...">text</a> ---> X text BAD I integrate a picture and define the picture as link Code: <a href="..."><img src="..."></a> ---> X <image> How can I avoid to show the X in front of the picture? Here is my CSS code: Code: #content a { background-image: url(images/arrow.gif); background-repeat: no-repeat; padding-left: 22px; text-decoration: none; color: #990000;} #content a:hover { text-decoration: underline;} Something like this does not solve the problem Code: 01 #content img a { background-image: none; } 02 #content img>a { background-image: none; } Any idea is greatly apreaciated. Thanks. Good Morning All, Been having a slight problem with the visual in the screenshot below. The blue line is our H2, and the purple one is our H3, however, as you can see, the underline spans the entire width of the column, not just underneith the text, which is our requirement. ***As i am not allowed to upload a url as a new user, the underline is as follows. With the text centre aligned. text ----------------------------------------------------------- rather than text ------ and obviously by the css, the underline on the headers is a small image, repeated - x. Please see relevant css information. * (line 23) { margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 0pt; padding-right: 0pt; padding-bottom: 0pt; padding-left: 0pt; } h2, h3, h4, h5, h6 (line 101) { font-size: 1.2em; font-weight: normal; padding-bottom: 4px; margin-top: 0.6em; margin-right: 0pt; margin-bottom: 0.8em; margin-left: 0pt; text-align: center; } .contentArea h2, #secondaryNavigation h2 (line 114) { background-color: transparent; background-image: url("../images/h2_gradient_bg.gif"); background-repeat: repeat-x; background-attachment: scroll; background-position: left bottom; color: #0066cc; } Many Thanks in advance. Marc. I would like to pop up the text, that is, make it bigger when the user hovers on it. but the problem everytime the text gets bigger, the whole row moves and the surrounding texts gets displaced. any idea ? tutorial? let me know if i need to explain more. can someone help me with this? here is the page&css I have been working on... the page file the css file I might be silly to use a template that I did on illustrator (with all the banner, boxes and navbar read and just use that as my container background. then I made some transparent boxes for puting in text, images or form elements. Is that why I am not able to select any other those things on the site? this is the first time I try using css to make the whole webpage, so I would appreciate any guidance...thanks!! I know how to position regular text using the in-line style "text-align:right", but when I try to do that with a link I get nowhere. Simplified example: Code: <html> <body> <td><p style="text-align:right">Google</p></td> <td><a href="http://www.google.com" style="text-align:right">Google</a></td> <td><a style="text-align:right" href="http://www.google.com">Google</a></td> <td><span style="text-align:right"><a href="http://www.google.com">Google</a></span></td> <td style="text-align:right"><a href="http://www.google.com" style="text-align:right">Google</a></td> <span style="text-align:right"><td><a href="http://www.google.com" style="text-align:right">Google</a></td></span> </body> </html> The first body line works fine to move the text to the right, but the link in lines 2-5 of the body are stuck on the left. Any suggestions? (My actual code invokes a class from a css page in a particular <td> and I'm trying to force a link in that <td> to the right using an in-line style; while I can do that for regular text I haven't found the secret of doing that for a link.) I saw a website that was throwing text that was written and recalling it with a link into a textbox...are there any tuts or anyone help me out with this one thanx aim rpduece i have almost perfected the text wrap for this page.... http://defunctgames.com/helpfix/relevent.php4 problem is, i put a margin-top:50px on the image, and i want the text above the image, to flow all the way to the left. thus fully wraping the text. Hi. See code below. Why does the outer SPAN in TABLE not grow with the image height. If the text is longer so it is forced below image then it looks as it should. Please also read some comments in the code. Code: <html><body><center><br><br> Why does image not force the outermost span to be at least as high as image?<br> If the text are long enough and gets below the bottom border of image it look good though.<br><br> NOTE: I need to put Image and text either within separate span or in same span as the examples below.<br> In my real application I'm using an <a href=" ...> around the outer span in examples below.<br> <br><br> <table border=1 cellpadding=0 cellspacing=0 width=200px><tr><td> <span style="display:block; background-color:#ffa827; padding-top:10px; padding-left:10px; padding-right:10px;"> <span style="display:block; float:left"> <img src="landscape.jpg" height="40px" width="40px" alt="" border="0"> </span> <span style="display: block; color: white;"> Text here. </span> </span> </td></tr></table> <br><br> <table border=1 cellpadding=0 cellspacing=0 width=200px><tr><td> <span style="display:block; background-color:#ffa827; padding-top:10px; padding-left:10px; padding-right:10px; color: white;"> <img src="landscape.jpg" height="40px" width="40px" alt="" border="0" style="float:left"> Text here. </span> </td></tr></table> </center></body></html> Hmm, This is a problem that has plagued me for a while, but just recently decided to find a solution. Basically I like to single out words for empasis on certain pages. Well with EM that's fine. However on a new website I'm coding I need to do (TYPE 1 FONT) (TYPE 2 FONT) (TYPE 3 FONT). All are different decorations. Is there a way to create a tag for each word? Thanks. Based on the questions I see being asked and answered here, I'm concerned many of you will laugh at my ignorance, but here goes anyway. I want to know how to use CSS on just a little text. For example, let's say I want to render One-Two-Three-BOOM as text on a Web page, except that what I really want is for the BOOM part to be in a larger font and bold-faced. Can that be done using CSS? Can I select the BOOM part in Front Page 2003 and impose a CSS style to those four letters and only those four? Everything I try, based on the CSS file I'm using, results in applying the new style to all of the text within a whole paragraph. I want to be able to apply the style to just a little text at a time. As another example, I want to render the following two lines Johnny G. Doe 123 West South Street in such a way that, using CSS to control everything, I can get the second line to appear in a smaller font. I can get it to work if there's a <p> between the two lines, but not if I want to separate them with a <br>. I'm not asking whether it's a good idea to use CSS this way, I'm just asking how to do it. I will try to attach a file to this thread that shows the first several lines of the CSS file I'm using, in case that makes a difference. If this doesn't work, please let me know. Thanks. --Johnny Is it possible to have text run around a div positioned with absolute positioning? Hi, Howdo you get text and and image on the same line. I want text and 2 images on the same line but the image appears on the next line like a <br> has been entered. There is plenty of room for all data.Each has its own <div>. |