I had this problem, whenever I add a file (say pdf), On checking the view source I see a div tag around the pdf link with 2 css class names assigned. (

)
Is there any particular reason to add this? Where are they defined btw, They create a line-break causing any text follwing the link to go on the next line...
viz:

is a link to my homepage.
above thing looks like:
link name
is a link to my homepage.

I solved this my putting them in a table row but I would prefer to edit the css to edit/remove the div tag.
I did a grep on the module/asset but still didn't get the definition of these classes to remove the line-break.
Please let me know hoe do we get this working.

Comments

sankett’s picture

my Bad, title should be: link formatting for assets.

sankett’s picture

Title: Multiple names for the same file (why replicate?) » div tags added for Asset links: creates link breaks - Not required.
wmostrey’s picture

sankett, I would advice you to download the latest dev version and check if you still encounter this issue.

sankett’s picture

Version: 5.x-1.0-alpha2 » 5.x-1.x-dev

@wmostrey

Thanks for replying, well I am using the latest feb 05th dex version. I still have this problem.
Let me know if you can fix it.
Thanks

sankett’s picture

Category: task » bug

@wmostrey

Hey any news why this may be happening?
I am not that much concerned about the css tags.... as much about the div tag itself it adds, because this is what actually causing the link break.

I did another test just to be sure:
I added a simple link using the link button in tinymce.
When I did view source all I could see is the "a href" tag and no div around it.

So,
When Asset plugin for tinymce tries to read this link.... eg: [asset|aid=29|format=link|formatter=asset|title=jokes on rules|align=none|height=undefined|width=undefined]
Asset says well now replace this html garbage with...

<div class="asset-asset-link asset-align-none"><a href="/jokes/site-address.php">jokes on rules</a></div>

This rendering has to come from Asset module.
Please help us solve--- "the mystery of the divs"!!!
All we should get is a link and no div tags around it.
Any suggestions?

wmostrey’s picture

Hey Sanket, I'm curious if this couldn't be solved by a simple css? For instance by a display:inline on the div class asset-asset-link?

sankett’s picture

Hey wmostrey

Thanks for that perfect suggestion it worked!

I will update some more details for other forum users.
Goto themes->configure
Check the use inline css (checkbox).

Add following links in the next block:
div.asset-asset-link { display : inline; }
div.asset-align-none { display : inline; }

Now the assets link will be followed with the text that you want on the same line. I am updating this issue as fixed!

-Sankett
Ajax and PHP Developer
because Open Source Matters..

sankett’s picture

Status: Active » Fixed

using Theme CSS hack.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.