?
Solved

CSS exclude something

Posted on 2011-09-29
6
Medium Priority
?
367 Views
Last Modified: 2012-08-13
OK, I'm not very familiar with CSS at all. But I am trying to make a change to a website that uses it. I simply want to add an a href mailto for an email link. But it is pulling the CSS for the link and it is ugly. Is there a way to exclude the line that I want to add from the CSS?

I'm sorry if this is vague, I'm not sure what information I need to give you. Thanks for your help.
0
Comment
Question by:wiggy353
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 8

Accepted Solution

by:
Jen0910 earned 1000 total points
ID: 36815791
you can create a custom class for that specific link.

http://diythemes.com/thesis/css-specificity-thesis/
0
 
LVL 30

Assisted Solution

by:LZ1
LZ1 earned 500 total points
ID: 36815792
Can you show us your HTML and CSS code for the elements your talking about? All you really would need to do is add a class to your CSS and then to the mail link, if you want to keep it simple.
/*CSS*/
a.mail{color#36f;}

<!--HTML-->
<a href="mailto:someone@domain.com" class="mail"> Mail me </a>

Open in new window

0
 
LVL 6

Assisted Solution

by:rknetwork
rknetwork earned 500 total points
ID: 36815811
Just overwrite a CSS class using style in the tag.

<a href="mailto:user123@domain.com" style="color:#00FF;font-size:12px;">Click here to email</a>
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 1

Author Comment

by:wiggy353
ID: 36815835
OK, this may go long, but I will post the code for the CSS and the HTML in question. Here is the CSS:

/* Overall Page */

body {
	margin: 0;
	padding-bottom: 2em;
	background-color: #FFFFFF;
	color: #000000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	border-top: 2px solid #1E2D54;
}
#header {
	border-top: 3px solid #1E2D54;
	border-bottom: 1px dotted #1E2D54;
	height: 5.5em;
}
#header .title {
	font: 190% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
	color: black;
	background-color: transparent;
	float: left;
	margin-right: 2em;
	margin-top: 1.5em;
	margin-left: .8em;
}

#header a:link, a:visited  {
	color: #336699;
}

/* Logged in user */
.login 
{
    font-size: smaller;
    font-style: oblique;
}

/* Navigation */

#navigation {
	width: 200px;
	top: 7em;
	left: 1em;
	width: 13em;	
	position:absolute;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size:90%;
	height: 170px;
}
#navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
}
#navigation li {
	border-bottom: 1px solid #3399CC;
}
#navigation li a  {
	display: block;
	padding: 5px 5px 5px 0.5em;
	border-left: 12px solid #1E2D54;
	border-right: 1px solid #1E2D54;
	background-color: #336699;
	color: #FFFFFF;
	text-decoration: none;
}
#navigation li a:hover {
	background-color: #1E2D54;
	color: #FFFFFF;
}
#navigation ul ul {
	margin-left: 12px;
}
#navigation ul ul li {
	border-bottom: 1px solid #1E2D54;
	margin:0;
	background-color: #3399CC;
	color: #1E2D54;
}
#navigation ul ul a:link, #navigation ul ul a:visited {
	background-color: #3399CC;
	color: #2E498F;
}
#navigation ul ul a:hover {
	background-color: #1E2D54;
	color: #FFFFFF;
}

/* Footer */
#header .siteimage 
{
    float: left;
    margin-left: 2em;
    margin-top: 0.2em;
}

#header .breadcrumb {
	font: 90% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
	color: black;
	background-color: transparent;
	float: right;
	margin-right: 2em;
	margin-top: 3em;
	font-weight:bold;
}

/* Main Content */

#content 
{
	margin-top: 1em;
	margin-left: 15em;
	margin-right: 2em;
	z-index: 1;
	left: -8px;
	top: 101px;
	position: absolute;
	height: 370px;
	width: 854px;
}
h1 {
	font: 150% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
}

#content p {
	font-size: 80%;
	line-height: 1.6em;
	z-index: 1;
	left: 0px;
	top: 0px;
	position: absolute;
	height: 21px;
	width: 854px;
}

#content .recordsselected {
	font: 90% Arial, Helvetica, Georgia, "Times New Roman", Times, serif;
	color: black;
	background-color: transparent;
	left: 15em;
	top: 7em;
	position: absolute;
	float: left;
	margin-right: 2em;
	margin-top: 0em;
}

#maincontent 
{
	top: 10em;
	left: 15em;
	position:absolute;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size:90%;
}

#content ul {
	font-size: 80%;
	line-height: 1.6em; 
}

#content mainimage {
    line-height: 5;
}

.Important
{
    font-size: large;
    color: Red;
}

.ContentText
{
    font-family:Verdana;
    font-size:8pt;
    color: black;
    font-weight: normal;
}

table.formularymaster
{
    font-family:Verdana;
    font-size:8pt;
    color: black;
    font-weight: normal;
}

table.formularymaster th
{
    background-color: #99CC99;
}

table.formularymaster td.d0
{
    text-align: right;
}

table.formularymaster td.d1
{
    text-align: right;
}

table.formularymaster tr.d0
{
    background-color: White;
}

table.formularymaster tr.d1
{
    background-color: #CCFFCC;
}

Open in new window


Here is the HTML in question:

            <div id="contact" align="left" class="d0">
            <asp:Label ID="lblBuildVersionText" runat="server" Font-Size="X-Small" ForeColor="Gray" Text="Software Build: "></asp:Label>
            <asp:Label ID="lblBuildVersionPbmSite" runat="server" 
            Font-Size="X-Small" ForeColor="Gray" Text="1.0"></asp:Label>
            <br />
            <br />
            <span>To report problems with this website, <a href="mailto:user@dom.com">click here</a></span>
            </div>

Open in new window

0
 
LVL 8

Assisted Solution

by:Jen0910
Jen0910 earned 1000 total points
ID: 36816284
I dont see an ID for "contact" at all. Add this to your css and change colors/text styling as you see fit:

#contact.d0 a, #contact.d0 a:link, #contact.d0 a:visited {color:#A00; text-decoration:none;}
#contact.d0 a:hover {color:#09C; text-decoration:none;}

Open in new window


Is there something else specific you are trying to achieve with this?
0
 
LVL 1

Author Comment

by:wiggy353
ID: 36816611
It came down to a problem with the <div> that it was is. Not the CSS. Thanks for the help.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question