Solved

CSS exclude something

Posted on 2011-09-29
6
346 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now