S
Some One
Hi!
I've created a CSS class that I use in a DIV tag. Is there a way that
I can write this class so it affects all the elements within the DIV?
I'm trying to affect the "text-decoration" of all the text elements
within the DIV (anchors, paragraphs, etc.)
What I have is pretty simple. The part sample below should produce
three lines of text on the browser, all links to various pages. The
first should be the default link colour, with no underline. The second
should be white text with an underline. The third and fourth should be
white text with no underline, indented 10 pixels. That isn't what
happens. They all follow the "a" (anchor) setting of "none" for the
decoration and the last two ignore the "color" setting to white. The
indent DOES work.
Obviously I'm doing something wrong. Can someone take a look and let
me know what my mistake is?
-------------------------------
<style>
a { text-decoration: 'none';}
.menu { color: '#ffffff';}
.level1 { margin-left: '0px'; text-decoration: 'underline';}
.level2 { margin-left: '10px'; text-decoration: 'none';}
</style>
....some code
<a href="home.html">Home</a><br>
<div class="menu level1"><a href="apage.html">A page</a><br></div>
<div class="menu level2"><a href="subpage1.html">Subpage
1</a><br></div>
<div class="menu level2"><a href="subpage2.html">Subpage
2</a><br></div>
I've created a CSS class that I use in a DIV tag. Is there a way that
I can write this class so it affects all the elements within the DIV?
I'm trying to affect the "text-decoration" of all the text elements
within the DIV (anchors, paragraphs, etc.)
What I have is pretty simple. The part sample below should produce
three lines of text on the browser, all links to various pages. The
first should be the default link colour, with no underline. The second
should be white text with an underline. The third and fourth should be
white text with no underline, indented 10 pixels. That isn't what
happens. They all follow the "a" (anchor) setting of "none" for the
decoration and the last two ignore the "color" setting to white. The
indent DOES work.
Obviously I'm doing something wrong. Can someone take a look and let
me know what my mistake is?
-------------------------------
<style>
a { text-decoration: 'none';}
.menu { color: '#ffffff';}
.level1 { margin-left: '0px'; text-decoration: 'underline';}
.level2 { margin-left: '10px'; text-decoration: 'none';}
</style>
....some code
<a href="home.html">Home</a><br>
<div class="menu level1"><a href="apage.html">A page</a><br></div>
<div class="menu level2"><a href="subpage1.html">Subpage
1</a><br></div>
<div class="menu level2"><a href="subpage2.html">Subpage
2</a><br></div>