SitePoint Sponsor |
|
User Tag List
Results 1 to 9 of 9
-
Sep 30, 2004, 21:04 #1
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can't figure out what I'm doing wrong here.
All I want to happen here is the text "Does your brain need a tune up?" to have a top margin so it is separated from the EEG Imaging pic and the list of things which is also an image. I want it about the same distance from then as EEG Neurofeedback is from the two images on top there, which is like 10px...but I can't seem to get this done. Looks like the effect I'm looking for is in IE, but Firefox is not happening.
Thanks
DeronLast edited by deronsizemore; Oct 1, 2004 at 18:48.
-
Sep 30, 2004, 21:15 #2
- Join Date
- Oct 2001
- Location
- North Carolina
- Posts
- 63
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sample link/code?
-
Oct 1, 2004, 09:43 #3
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorry...here is the link for the site.
http://www.geocities.com/deronsizemore/eegneuro.htm
-
Oct 2, 2004, 06:59 #4
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
anyone at all?
-
Oct 2, 2004, 08:08 #5
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi Deron,
Just put the margin on the image instead
Code:#welcome { } #firstp { } #firstp img{ float: left; margin:10px 14px 10px 0; } #secondp { clear: left; }
Paul
-
Oct 2, 2004, 09:14 #6
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Ohhhhhh..Thanks Paul. Was I correct in putting clear:left; in the secondp div??
-
Oct 2, 2004, 09:18 #7
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Originally Posted by deronsizemore
I think the reason the margin wasn't working is that because the image was floated then its parent assumed it had no content and the bottom margin would have been applied from the parent which was collapsed into a single line at the top. If you had cleared the images inside their parent then the margin (probably) would have taken effect.
However its just simpler to give the image a margin and save a load of code.
Paul
-
Oct 2, 2004, 09:29 #8
- Join Date
- Mar 2004
- Posts
- 2,159
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
So there really is not need for the clear:left; to be inside of the second p div? In fact I should have placed a clear: both; inside of the #firstp img {};?
-
Oct 2, 2004, 12:20 #9
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
No you still need to clear the floats:
Code:#secondp { clear: left; }
Paul
Bookmarks