CSS code to remove underline below images?
-
I have a CSS/X HTML site which I'm editing. Everything is going fine except on my portfolio page. In the CSS, default links have an underline which I want but not for image links. My gallery has many thumbnails and they all have a line under which looks awful. Here is the CSS: * { margin:0; padding:0; } body { background:#FFFFE5 none repeat-x scroll top left; margin:0 auto; padding:0; font-family:Arial, Helvetica, sans-serif; } /* wrapper */ div#wrap { width:90%; margin:0 auto; padding:0 10px; } /* header & nav */ div.header { margin:0 auto; background:#677252 url('images/titlebg.jpg') repeat-x scroll bottom left; } div.nav { padding:0; margin:0 auto; width:90% } div.title { padding:50px 20px; margin:0 auto; } div.innertitle { width:90%; margin:0 auto; } div.nav ul { list-style:none; padding:0 0 0 10px; margin:0; position:relative; } div.nav ul li { display:inline; float:left; margin:0 5px; } div.nav ul li a, div.nav ul li a:visited { float:left; text-decoration:none; color:#FFFFE5; font-weight:normal; font-size:0.9em; font-family:Arial, Helvetica, sans-serif; border:none; } div.nav ul li a span { padding:10px 20px; display:block; } div.nav ul li.selected a span, div.nav ul li.selected a:visited span { background:transparent url('images/nav-bg-left.png') no-repeat scroll top left; color:#242833; } div.nav ul li.selected a, div.nav ul li.selected a:visited { background:#FFFFE5 url('images/nav-bg-right.png') no-repeat scroll top right; } /* headers */ h1, h2 { text-align:left; color:#FFFFE5; } h1 { font-size:2.8em; padding-left:10px; text-transform:uppercase; letter-spacing:10px; font-family:Georgia, "Times New Roman", Times, serif; } h1 a, h1 a:hover, h1 a:visited { text-decoration:none; color:#FFFFE5; border-bottom:none; } h2 { padding:0 0 10px 10px; font-size:0.9em; font-family:Georgia, "Times New Roman", Times, serif; } h3 { font-size:1.5em; font-family:'Lucida Sans Unicode','Lucida Grande',verdana,sans-serif; font-weight:normal; color:#333333; } h4 { color:#3E4431; font-family:Arial, Helvetica, sans-serif; font-size:1.6em; font-weight:normal; padding:5px 5px 5px 10px; border-left:10px solid #3E4431; } /* element defaults */ p { margin-bottom:20px; line-height:1.7em; font-size:0.95em; color:#333333; } ul { padding:0 0 20px 35px; } code { border:1px solid #3E4431; border-left-width:10px; background-color:#ffffff; display:block; padding:10px; margin:10px 0; } /* default forms */ form {} form input, form textarea { border:2px solid #dddddd; padding:5px; color:#666666; font-family:Arial, Helvetica, sans-serif; font-size:1.0em; } form input.formbutton { background:#677252 url('images/titlebg.jpg') repeat-x scroll bottom left; color:#ffffff; font-size:0.9em; border:1px solid #323928; font-weight:bold; font-family:Verdana, Arial, Helvetica, sans-serif; } /* default tables */ table { width:100%; margin-bottom:10px; } table tr th, table tr td { padding:5px 10px; } table tr th { background:#5E008D url('images/titlebg.jpg') repeat-x scroll bottom left; color:#ffffff; } table tr td { border-bottom:1px solid #dddddd; } /* default links */ a { color:#3E4431; border-bottom:1px solid #677252; text-decoration:none; } a:visited { color:#3E4431; } a:hover { color:#677252; } /* centeral page */ div.page { margin:0 0 0 11px; background-color:#FFFFE5; padding:10px 10px 0 10px; } div.page ul { list-style:square; font-size:0.95em; } div.page ul li { padding:3px 0; } /* content */ div.content { width:65%; float:left; } /* sidebar */ div.sidebar { width:30%; float:right; } div.sidebar ul { list-style:none; padding:10px 10px 25px 10px; } div.sidebar ul li { padding:7px 0; } div.sidebar ul li a { text-decoration:none; font-size:1.2em; } /* footer */ div.footer { clear:both; margin-top:10px; border:1px solid #606B4D; border-bottom:none; background:#677252; padding:20px 0; } div.footer p { text-align:center; color:#ffffff; margin:0; padding:0; font-size:0.7em; font-family:Verdana, Arial, Helvetica, sans-serif; } div.footer p a { color:#ffffff; border-bottom:1px solid #ffffff; } /* search form */ form.searchform { padding-top:10px; } /* misc classes */ *:focus { outline:none; } .clear { clear:both; } ______________________________________… Here's the html of the image link. <A STYLE="text-decoration:none" href="http://img22.imageshack.us/img22/6… target="_blank"> <img src="http://img22.imageshack.us/img22/42… </a>
-
Answer:
You need to remove all borders with the Universal Selector at the top of your CSS: * { margin: 0; padding: 0; border: 0; } Remove this to get rid of underline: border-bottom:1px solid #677252; I would also add "text-decoration: none;" to all the CSS styling for the links. HTHs, Ron
Kat at Yahoo! Answers Visit the source
Other answers
try img{ border:0; } or make a class or ID and attach border:0; to the image that you wanted. Good luck!
K L U D G E
Related Q & A:
- How do you search DOM elements using CSS selectors in Chrome?Best solution by Stack Overflow
- How to apply custom css to CKEditor?Best solution by stackoverflow.com
- Why would Arial be placed before Helvetica when using font-family in CSS?Best solution by Quora
- How to save ONLY the CSS changes of Styles panel of Chrome Developer Tools?Best solution by Stack Overflow
- Is it possible to use SVG images as CSS background?Best solution by helephant.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.