span

Wrap some specified words with span in jQuery?

Hello I'd like to know the most convenient way to wrap some specified words with span-tags. Example: I have a word, which is dog. Here's the original text: I have a dog, do you have a dog? And output should be like this: I have a <span class="highlight">dog</span>, do you have a <span class="highlight">dog</span>? Simple problem ...

user dbl-clicks on a word inside a SPAN or P or DIV; the word is highlighted; how to get the selected word?

Can you get the word the user has double-clicked on? I've tried in a onDblClick eventhandler but selectionStart is undefined there; and the onselect event seems to be available only for TextArea. ...

Drupal removing pointless span classes

I am working on a Drupal site here: http://selkirk.treethink.net I have a couple modules that are firing out an insane amount of span classes, which you can see in the source code there. Nice menus is one of these and is causing 60% of them. I need to prevent these modules from doing this but I can't seem to find the code that's doing...

How to set height property for SPAN

Hello guys. I need to make following code stretchable with predefined height <style> .title{ background: url(bg.gif) no-repeat bottom right; height: 25px; } </style> <span class="title">This is title</span> But since span is inline element, "height" property won't work. I tried using div instead, but it will expand up to th...

Multiline span-behaving elements

I want to display a list of complex, but fixed-size multiline elements, assuming that they will wrap the page line when line end is reached, making them appear by n in each row, when n depends on page width. Something like: Mary had Mary had Mary had a little a little a little LAMB LAMP WHISKEY Mary had a li...

jQuery: Insert html from "title" tag into a "span" of a H2 tag

Hey guys, Say I had the following HTML: <h2>Heading <span></span></h2> <ul> <li><a href="#" title="I am wanting to be in H2!">Something</a></li> <li><a href="#" title="I too am wanting to be in H2!">Something else</a></li> </ul> I want to be able to take the title tag from the and place it inside the span of the h2. How can I do so?...

Does height and width not apply to span?

Total noob question, but here. CSS .product__specfield_8_arrow { /*background-image:url(../../upload/orng_bg_arrow.png); background-repeat:no-repeat;*/ background-color:#fc0; width:50px !important; height:33px !important; border: 1px solid #dddddd; border-left:none; border-radius:5px; -moz-border-ra...

Silverlight: Set Items Widths in ItemsControl to Stretch

I've got an ItemsControl which fills from top to bottom, but I can't get it's child items to occupy the whole width of the ItemsControl: I basically need to stretch the green bits to fill the width of the control (as shown by the blue bits). I've tried things like setting the HorizontalAlignment property of the template item to Stret...

Firefox and IE - Firefox handling of <span> inside tables (html and css)

Hello, I am having difficulties getting a span tag to work properly inside a table. It appears as if the entire span tag is being ignored that is defined anywhere in between table tags in firefox, but in IE this shows up correctly. Maybe I am missing something, but I have created a small example css and html file that displays different...

HTML/CSS issue with a:hover and spans

Any way I can get this working? I have a block of code: <p><a href="http://foo.com"&gt;&lt;span class="title">Title</span><br /><br /> Some text no greater than a couple of lines...</a></p> My styles are: p {color:#FFF;} a {color:#999;} .title {color:#FFF; font-weight:bold;} a:hover {color:#FF0;} My problem is as follows: I want ...

sIFR header with inside span

I've got the following situation: <h2>This text is <span>pretty awesome</span></h2> I'm trying to give both a different style like this (only the css): h2 { font-size: 21px; text-transform: uppercase; line-height: 37px; height: 36px; text-align: right; margin-right: 10px; } h2 span { font-size: 16px; color: #666666; text-transform: l...

simple div containing span won't size correctly

I thought I was pretty knowledgeable about CSS but this simple problem baffles me. <div><span>sample text</span></div> results in the div's height being smaller than the height of the span if the span has padding. I realize that there are ways to use "float" to make the div size correctly, but floats always seem to introduce undesire...

Draggble object hides outside content when wrapt in span

I have a simple CSS problem In this site http://web.cinaird.se/pdf/test.htm (<--removed) I have a draggable images in the top content, I want a span that float on top of the image and for this I need a span containing the image and a span floating on top. So long no problem but now when i drag the image it hides outside the top conte...

Rails and the <span> tag

I'm fairly new to Ruby on Rails, and I'm attempting to create some fancy CSS buttons using the "sliding doors" technique. I have it almost working, but I feel like there has to be a better way to handle the tags for a link. The way I'm currently doing it: <%= link_to '<span>New car</span>', {:action => "new"}, :class=>"button" %> ...

MKMapView span doubling bug

Setting the region in MKMapView occasionally results in the span being doubled. This bug seems to appear early in the map initialization phase. Although it's been reported elsewhere I wasn't able to find a descent existing workaround, so I'm posting my fix here. It relies on the fact that the regionThatFits method also produces the bug. ...

Displaytag table exported header column contains span tags

Hi, When I export the content of the display tag table I use the data shows up fine, but the header cells are surrounded by html span tags, which is slightly annoying. I can imagine why Displaytag uses spans around the column header's text, but it shouldn't transpose in the exported data I think. Here is my displaytag.properties con...

<span> tag selection problem within anchor using jquery

Dear expert, I have facing a problem to select span tag using jquery. Please give a solution. code: <ul> <li> <a href="#Document1">Document 1 <span id="tab_close> x </span> </a> </li> </ul> ...

JQuery - How to add a single html tag to some html?

Hey Guys, I want to insert just a single <span> before the text below (right before LINK): <li><a href="">LINK</a></li> So, the above becomes <li><a href=""><span>LINK</a></li> Here is my JQuery Code: $('#mainnav li a').prepend('<span>'); When I view the code in firebug after, I see , how do I just get the opening span tag an...

Collapse span when input button is hidden

I have a style that wraps around an input button, so the button can be styled very creatively. When the button is hidden in .Net, i would like the style to collapse so it renders like its hidden as well. What the style does, as a result of no value in the button or its hidden, is it keeps a small shape. Click to see a demo: http://media...

Internet Explorer SPAN style issue when Input button is removed

Internet Explorer does not remove the extra padding from my button when the input button is missing. The input button will sometimes be missing, because on a dynamic page the button will sometimes be hidden. See my example using Internet Explorer when viewing my demo link: http://media.apus.edu/it/evan-testing/form.htm I tested this i...