Jump to content


Photo
- - - - -

Span Elements In Reader Post Titles Generating Unwanted Newlines


Best Answer ejclarke , 06 December 2012 - 10:04 AM

Okay, I figured it out. Feel pretty silly now. :D

 

The styling on the Reader's nav elements is pretty general for spans, so every span there is being put into display: block mode and given some generous padding.

 

The fix is super easy: just overwrite those styles in the custom CSS, reverting them back to their plain forms. Something like the following:

 

 .readernav ul li span .classname, .readernav ul li span .classname-1, .readernav ul li span .classname-2 {
  border-bottom-style: none;
  display: inline;
  padding-bottom: 0;
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
}

 

Ta-daa!

Go to the full post


  • Please log in to reply
1 reply to this topic

#1 ejclarke

ejclarke

    Newbie

  • Members
  • Pip
  • 4 posts
  • Country: Country Flag

Posted 06 December 2012 - 09:49 AM

I'm building a Reader-based FAQ, and I'm using span elements to encase a trademarked product name that appears in the reader title and contents, simply so that this product name can be styled site-wide.

 

The title I am trying to insert into the Reader (to form the question tab on the left) is the following:

 

Please Login or Register to see this Hidden Content

 

Whereas those product spans are being rendered and styled perfectly in the contents (i.e. body) section of this Reader post, in the left-hand tab there are line breaks being inserted wherever these span elements occur in the title (please see attached image).

 

Is there any way to make the Reader NOT see any closing span as a reason to insert a line break (or whatever it's doing there)? Alternatively, is there a different element that I can use instead of the span, to be able to attach a styling class to the product name there?

 

The [pl_raw] shortcode doesn't work for this issue by placing it in the title (it just renders the shortcode as is).

 

This rendering occurs in both FF 17 and IE 10.

 

Thanks for any assistance.

 

Regards,

EJ

Attached Files



#2 ejclarke

ejclarke

    Newbie

  • Members
  • Pip
  • 4 posts
  • Country: Country Flag

Posted 06 December 2012 - 10:04 AM   Best Answer

Okay, I figured it out. Feel pretty silly now. :D

 

The styling on the Reader's nav elements is pretty general for spans, so every span there is being put into display: block mode and given some generous padding.

 

The fix is super easy: just overwrite those styles in the custom CSS, reverting them back to their plain forms. Something like the following:

 

Please Login or Register to see this Hidden Content

 

Ta-daa!