登录 | 注册 | FAQ
Anonymous

make an HTML tag act a certain way inside a certain class

+ 发表回复

2 篇帖子 分页: 1 / 1


make an HTML tag act a certain way inside a certain class

krisb1220 » 周四 9月 29, 2016 2:22 am

Hello, I am a novice HTML and CSS "student"(no formal teaching, teaching myself) and I was wondering;

Is there a way to make an HTML tag(such as <a>) act a certain way inside of a certain class class?

The only way I can think of to visualize this is like this:

代码: 全选
#exampleclass {

  a {
      text-decoration:none;
   }

}


I understand this may be impossible, but if it is possible I'm sure it would be a useful skill to learn as I'm slowly trying to piece together a sample website in order to learn! Thank you! :)
头像

krisb1220

  • 帖子: 1
  • 注册: 周四 9月 29, 2016 2:17 am

Re: make an HTML tag act a certain way inside a certain clas

Farhin Qureshi » 周四 1月 05, 2017 10:31 am

Hi,

Instead of using this code

#exampleclass {

a {
text-decoration:none;
}

}

You can use the following:
#exampleclass a
{
text-decoration:none;
}
头像

Farhin Qureshi

  • 帖子: 45
  • 注册: 周二 1月 03, 2017 11:33 am
--
Farhin Qureshi
.NET Developer
http://www.ifourtechnolab.com


+ 发表回复

分页: 1 / 1