Walter Davis wrote in post #992312:
> On Apr 12, 2011, at 2:56 AM, Mohnish J. wrote:
>
>>>>> would look, Kindly register in www.diasp.org and search for any
>>>>
>>>> class="informal">Some other descriptive text.</span></li>
>>>>
>>>
>>> If you have a profile there, kindly post your answer there so that I
>> html concepts,
>>  <%=image_tag "investor_groups/#{inv_group.title}.jpg" , :width =>
>> .description{
>> over
>> to it(Kindly refer:-
>> http://imagepaste.nullnetwork.net/viewimage.php?id=2054 ). I am not
>> sure
>> where I am doing what wrong that the functionality is getting affected
>> as a result.
>>
>> Kindly guide me to correct my mistake(s) on this
>>
>> Thanks..
>>
>
> Not sure if you've already sorted this out, but if I'm reading this
> correctly, your code will be generating something similar to this cut-
> down example:
>
> ul
>   img/
>   li
>     some text
>   /li
>   img/
>   li
>     some text
>   /li
>   ...
> /ul
>
> This is completely invalid HTML, so getting CSS to do anything useful
> with it will be next to impossible.
>
> What you must do is get that image inside the li, where it belongs,
> and if you don't want it to be in your autocompleter populated
> content, then wrap the image in a span.informal. If this isn't for
> your autocompleter results, then you still must put the images inside
> the li tags, but you have all sorts of tools to get the layout to work
> the way you expect once you do that.
>
> One of the best tools you can use to get this sort of problem sorted
> is first to go the validator.w3.org and either put in the URL of your
> (public) site, or paste in the View Source rendered code from your
> browser in the Direct Input field. Either one will point out where
> your layout fails to validate. Once you have valid HTML (think of it
> as the foundation for your skyscraper) then you can start with the
> fancy mullions and whatnot of CSS.
>
> And when you get into that end of things, you can use a tool like
> CSSEdit, which can "override" a stylesheet from your site (either
> localhost or live) and present you with a preview showing the results
> of your tinkering in real-time. No need to save, upload, etc. What you
> see is a "visual merge" between the actual HTML+CSS and HTML+CSS+your
> changes.
>
> Walter

Hi Walter,

Based on your inputs..

This code below did the magic for me...

<ul>
  <%= javascript_include_tag :defaults, :cache => true %>
  <%=stylesheet_link_tag "groups"%>
  <% for inv_group in @investor_group2 %>

   <li><div class="autocomp_field_width_modify" ><%=image_tag 
"investor_groups/#{inv_group.title}.jpg" , :width => '40', :height => 
'22', :align => 'left' %><%=h inv_group.title%><span 
class="informal">(<%=h inv_group.activated_members.size 
%>)</span></div></li>

  <%end%>
</ul>

and in my groups.css I added the following:-

.autocomp_field_width_modify
{
      text-align: justify;
      text-indent: 3%;
}

Thanks for your suggestion Walter, I know I might not be exactly 
following HTML Markup standards( I have still a lot ground to cover to 
strengthen my concepts in HTML.. ). But I am just happy that finally 
this works based on the requirement.

Thanks again.. Walter..

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to