Solved

CSS exclude something

Posted on 2011-09-29
6
356 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
6 Comments
 
LVL 8

Accepted Solution

by:
Jen0910 earned 250 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 125 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 125 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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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 250 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

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

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
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).

830 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