Old 15-06-2007, 10:47   #1 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 226
Divs

This is a simple problem. I have a div which is 150px wide floated left. I have placed a picture in that div, however any content after the image appears over the image instead of below it...why is this!?
  Reply With Quote
Old 15-06-2007, 10:54   #2 (permalink)
emil
dt immigrant
 
emil's Avatar
 
Join Date: Nov 2004
Location: Bucharest - Romania
Posts: 6,769
Send a message via ICQ to emil Send a message via MSN to emil Send a message via Yahoo to emil Send a message via Skype™ to emil
Do you actually know what you are doing?
Have you considered starting systematicaly, I mean actually learnig stuff for a change?
__________________
  Reply With Quote
Old 15-06-2007, 10:57   #3 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 226
Its a help me section and its a simple question
  Reply With Quote
Old 15-06-2007, 11:03   #4 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 524
Send a message via MSN to djeglin
its not that simple cause it shouldnt really happen. how about you post, or link to, the html and css?
__________________
My signature sucks.
  Reply With Quote
Old 15-06-2007, 11:05   #5 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 226
HTML:

<div id="colleft">
<img src="../images/logo_bb.gif" alt="Boys' Brigade Logo" align="right"/>
<p>The text goes here....</p>
</div>

CSS:

#colleft {
width: 155px;
float: left;
}

Thank you.
  Reply With Quote
Old 15-06-2007, 11:22   #6 (permalink)
solix
hello
 
solix's Avatar
 
Join Date: Mar 2007
Location: Holland
Posts: 569
Tried it, and I think it's working fine here. Maybe it's because of the align="right" part..
__________________
  Reply With Quote
Old 15-06-2007, 11:25   #7 (permalink)
pgo
i'm done, son
 
Join Date: Jan 2005
Posts: 12,262
Code:
align="right"
There's your problem right there. I bet. Not sure why, though - probably a conflict between doing things the right way - "float" - and the wrong way - "align".
  Reply With Quote
Old 15-06-2007, 11:26   #8 (permalink)
e.boal
Loveable loser.
 
e.boal's Avatar
 
Join Date: Apr 2006
Location: Newcastle
Posts: 226
Completely right...I wanted to align the image to the right without adding a left margin as it would place a margin to the left of all content in that column. When I take it out it is fine.
  Reply With Quote
Old 15-06-2007, 12:12   #9 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 524
Send a message via MSN to djeglin
You could just have assigned a margin to the image, and not to the div... ie:

#colleft img {
margin-left: 40px;
}

always remember its not just divs that you can add margins etc to.

Cheers

David
__________________
My signature sucks.
  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