Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

css question -easy, i think

Posted on 2016-10-05
2
Medium Priority
?
74 Views
Last Modified: 2016-10-05
I have the following code:

.cta-teal-outline {
	border: 3px dashed #1fbcc0;
	padding: 10px;
	border-radius: 10px;
	max-width: 400px;
}
.cta-teal {
	border-radius: 10px;
	padding: 15px;
	background-color: #1fbcc0;
	color: #fff;
}
.cta-teal a{
	color: #fff;
}
.cta-teal a:hover{
	background-color: #f48f4a;
}

<div class="cta-teal-outline"><div class="cta-teal"><a href="#">Subscribe Now</a></div></div>

Open in new window


On hover, I just want all the teal to change to orange. Meaning the background and dashed lines. No matter how many iterations I do, its never perfect.

Any ideas?
0
Comment
Question by:a204801
2 Comments
 
LVL 20

Accepted Solution

by:
Russ Suter earned 2000 total points
ID: 41830852
Try this:
.cta-teal-outline {
	border: 3px dashed #1fbcc0;
	padding: 10px;
	border-radius: 10px;
	max-width: 400px;
}
.cta-teal {
	border-radius: 10px;
	padding: 15px;
	background-color: #1fbcc0;
	color: #fff;
}
.cta-teal a{
	color: #fff;
}
.cta-teal-outline:hover {
	border-color: #f48f4a;
}
.cta-teal-outline:hover .cta-teal{
	background-color: #f48f4a;
}

Open in new window

0
 

Author Closing Comment

by:a204801
ID: 41830856
works as expected. excellent solution.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

876 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