Click here to register.
      
PBWG Banner


     Discuss > Web Design, Templates, and Themes

Paragarph issue in link lists

User bernd
Date 7/5/2008 4:04 pm
Views 994
Rating 0    Rate [
|
]
Previous · Next
User Message
bernd

There seems to be an issue with paragraphs in link lists. If users enter a single line without hitting the return key links are displayed as

<link> - <description>

If they hit the return key, however, a paragraph is inserted by the editor and links appear as

<link> -

<description>

So far, I have not found out how to remove paragraph tags again since the default post editor does not include an html view button. Of course, I could modify the appearance of the editor. But I believe there should be an easier way to fix this. Has anyone ever dealt with this problem?

Bernd

--
Trying to build a non-profit community portal for free-climbers around Magdeburg/Germany. Check out http://www.klettern-md.de (under construction).

--- (Edited on 05.07.2008 23:04 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
rogier

Paragraphs have a newline before and after, because they are block elements. Use display:inline in your css to make them inline elements and thus remove the breaks. Something like this:

div.linklist p { display: inline; }

And add the div (with class="linklist") in the template right before and after the post loop. You don't want all your Ps to be inline :-)

 

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 10-07-2008 5:47 pm [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 
bernd

Paragraphs have a newline before and after, because they are block elements. Use display:inline in your css to make them inline elements and thus remove the breaks. Something like this:

div.linklist p { display: inline; }

And add the div (with class="linklist") in the template right before and after the post loop. You don't want all your Ps to be inline :-)

 

Thanks, Rogier. That seems to be a good workaround. My link lists are being displayed correctly now. I submitted an RFE requesting an update of the link list template.

I have also tried to target only the first-paragraph by p:first-child. However, that did not work as expected. Maybe, someone knows if this is feasable with CSS?

--- (Edited on 23.07.2008 16:11 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 
rogier

Glad to be of help. :first-child does not work in IE6 and below. Neither does any other method for doing what you want. I would use this though:

.linklist a+p {display:inline;}

It means: only select a <p> when it follows an <a>. So you can make only the first p display:inline. But as I said, it wont work in IE6 and below.

As far as your RFE is concerned, I am working on new default templates for WebGUI. It will take some time before they are done and I haven't looked at the link list yet, but if I do, I'll make sure that I put those divs in there.

 

Rogier | United Knowledge
www.unitedknowledge.nl · www.webgui-help.nl

--- (Edited on 31-07-2008 11:36 am [GMT+0200] by rogier) ---



Back to Top
Rate [
|
]
 
 
bernd

Glad to be of help. :first-child does not work in IE6 and below. Neither does any other method for doing what you want. I would use this though:

.linklist a+p {display:inline;}


Works like a charm! Thanks again, Rogier! This should be definitely part of your new templates.

--
Administrator of a non-profit community portal for free-climbers around Magdeburg/Germany. Check out http://www.klettern-md.de.

--- (Edited on 12.08.2008 21:04 [GMT+0200] by bernd) ---



Back to Top
Rate [
|
]
 
 

Recent Discussions Color Key

Design:

Development:

Et Cetera:

Install/Upgrade:  

Smoketest:

Template Group:


Re: Site paid for by advertizing by Klaus - Fri @ 02:27am

Smoke Test for WebGUI (Stable) (2008-11-21) by botaction - Fri @ 12:37am

Re: Site paid for by advertizing by pwrightson - Thu @ 10:59am

Re: Site paid for by advertizing by JT - Thu @ 08:58am

Re: Regelmäßiger Termin für Usertreffen in der Rhein-Neckar-Region by Klaus - Thu @ 06:11am

Smoke Test for WebGUI (Stable) (2008-11-20) by botaction - Thu @ 12:00am

Smoke Test for SVN (2008-11-20) by botaction - Thu @ 12:00am

Re: Improving page layouts by fdillon - Wed @ 08:38pm

Re: Improving page layouts by knowmad - Wed @ 08:25pm

Re: Site paid for by advertizing by knowmad - Wed @ 08:07pm

Re: SSL Configuration? by knowmad - Wed @ 07:51pm

Re: The Death of the Collaboration System by preaction - Wed @ 07:39pm