Old 11-04-2008, 13:45   #1 (permalink)
mohalfares
Registered User
 
Join Date: Apr 2008
Posts: 2
floating images with <il>

Guys,

I'm trying to let the image appear within the paragraph, so I used this:

PHP Code:
img.floatLeft 
    
floatleft;
    
margin0 0 10px 10px;
    
padding2px;


When I call the image with the class floatLeft in a normal paragraph, everything goes just fine. The problem is when I call it in a paragraph where an <il> tag is there, then the points inside the <il> goes extremely right!

Am I missing something? please let me know

Thanks
  Reply With Quote
Old 11-04-2008, 15:56   #2 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
What's an <il> tag and what's it doing in a <p>?
  Reply With Quote
Old 11-04-2008, 17:32   #3 (permalink)
mohalfares
Registered User
 
Join Date: Apr 2008
Posts: 2
Ooops, did I say <il>!! , sorry, I meant <li>

Here is the HTML Code I've used along with the CSS above:

HTML Code:
<ol> <img class="floatLeft" src="/path/.gif" /> <li>text <li>text </ol>
  Reply With Quote
Old 12-04-2008, 03:04   #4 (permalink)
Shiro
shiro
 
Shiro's Avatar
 
Join Date: Aug 2007
Location: Yokohama, Japan
Posts: 2,605
You have no <p> tag there (which you were talking about), and your li tags aren't closed.

What exactly is it you want to do, and why do you want to do that?
  Reply With Quote
Old 12-04-2008, 11:56   #5 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,340
First off, that's invalid HTML for two reasons.
  1. Your <li>s are not closed.
  2. Your image is not inside an <li>. The only valid children of <ol> and <ul> are <li>s.
  3. You haven't specified an alt attribute for your <img />.
Invalid code means unreliable rendering.
  Reply With Quote
Old 13-04-2008, 01:54   #6 (permalink)
campbell
Web Hoster
 
campbell's Avatar
 
Join Date: Jan 2008
Location: Canada
Posts: 185
This goes into the HTML file where you want your image to be placed.
Quote:
<p><img src="http://www.designerstalk.com/forums/images/imagename.jpg"class="img_yourname">Its a beautiful day in teh neighbohood. You paragraph goes here. Latidah ti dah. I don't know what else to say but yeaaa. </p>


This is for the css file.
Quote:
.img_yourname{
float: right;
margin: 5px;
}

you can edit the attributes for the placement of the image instead of using what i have there.
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8