maqskywalker
asked on
position span inside a table cell by class or id
If i have a html table with id of mytable and inside of this table i have a table cell with class colstyle 2. In this table cell I have 2 spans.
One span has a class of span1class and the other one has a class of span2class
If I use this css statement it positions both of my spans on the top right
#mytable td.colstyle2 span {
position: absolute;
top: 1px;
right: 1px;
}
How would my statement look if I only want the statement to apply to the span with class span1class ?
One span has a class of span1class and the other one has a class of span2class
If I use this css statement it positions both of my spans on the top right
#mytable td.colstyle2 span {
position: absolute;
top: 1px;
right: 1px;
}
How would my statement look if I only want the statement to apply to the span with class span1class ?
please share your html code or link.
ASKER
Hi here is a fiddle of my example.
http://jsfiddle.net/r2db13tg/
Notice how the span containing "Howdy" and the span containing "Hello" are both being put on the top right.
I only want the span with class Peach containing "Hello" to be put on the top right.
My desired result should look like this:
So in my fiddle. This span with and it's hyperlink are the only thing I want put on the top right corner:
<a href="http://www.google.com">
<span title="My Second Span" class="PeachClass" id="TestSpan2">
Hello
</span>
</a>
http://jsfiddle.net/r2db13tg/
Notice how the span containing "Howdy" and the span containing "Hello" are both being put on the top right.
I only want the span with class Peach containing "Hello" to be put on the top right.
My desired result should look like this:
So in my fiddle. This span with and it's hyperlink are the only thing I want put on the top right corner:
<a href="http://www.google.com">
<span title="My Second Span" class="PeachClass" id="TestSpan2">
Hello
</span>
</a>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect. Thanks.
You Welcome