This is a discussion on "gap between img and div" within the Web Page Design section. This forum, and the thread "gap between img and div are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
gap between img and div
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
gap between img and div
hello!
I am working on a layout at this page with this code:
In my css, I defined the #nav as:
Thanks a ton! |
|
|
|
|||
|
Re: gap between img and div
try putting the img tag inside the div
|
|
|||
|
Re: gap between img and div
I've can't put it inside the same div because the div is <div class="nav"> which has my navigation bar for a background image. It would just tile the navbar image.
I did try putting the img and div within the same div
grrrr |
|
|||
|
Re: gap between img and div
Somewhere early in your css you should have;
If that doesn't fix it, put the page somewhere live where we can see it. Ok, forget that. I've just noticed you have included it inline. Looks like we need to see the page. Last edited by ukgeoff; Nov 15th, 2006 at 16:22. Reason: Additional comment |
|
|||
|
Re: gap between img and div
the test site is comteck.iguessnot.com.
You can see that there is maybe... 5 or 6 pixels of space. Also, I have added in my header img tag margin="0" padding="0" but you are suggesting that I should make a new css tag with that img info? I will certainly try that. The links included in the original code link back to the site that I am beefing up... which is dreadful lol. I really appreciate this as I am losing my cotton pickin mind! |
|
|||
|
Re: gap between img and div
ok i added the
|
|
|||
|
Re: gap between img and div
try:
|
|
|||
|
Re: gap between img and div
I just registered to help you... i have this problem all the time. Annoys me everytime and each time i forget the solution. This time i remembered. (yay me)
Just put display:block on all your image styles. If that fails on your divs as well. |
|
|||
|
Re: gap between img and div
Quote:
Thank you thank you thank you! I appreciate it so much! I don't even know what that display:block means yet, but it worked perfectly. I thank you so much!! |
|
|||
|
Re: gap between img and div
I'm glad i could help... as for display block i don't know what it means either. If anyone can explain it the please feel free.
|
|
|||
|
Re: gap between img and div
The css atribute-value pair display: block, is the default for some elements such as <div> and <p> and it means two things. One that the element is actually visible and the second that it will take up as much width as possible.
Elements of this type naturally stack up on top of each other as apposed to side by side. Two of the other values most commonly used are; none and inline. As block is the default style for certain elements, explicitely specifying it should not have been the solution. I will look at your page and post further. |
|
|||
|
Re: gap between img and div
Once again geoff is here to explain everything to us. Thank You
|
|
||||
|
Re: gap between img and div
Block Level Elements as stated are like this:
[ element ] [ element ] Inline elements i.e. span, etc... are like this: [ element ] [ element ] The Attributes are: display:inline; display:block; For example if you wanted an unordered list to be horizontal you would use display:inline; or if you displayed each li as a block you would float: the li etc.. Hope that clears it up a bit.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: gap between img and div
now that I understand what that element means, i wonder why it solved my problem?
I must have coded something wrong to begin with. If anyone wants, please feel free to check out my css to see if I dropped the ball on something. css I am so happy I found this forum. |
|
||||
|
Re: gap between img and div
One thing I did notice was this:
<!--[if lte IE 6]> Special instructions for IE 6 here <![endif]--> LTE = lesser than or equal too LT = Lesser than etc... And then of course for IE 7 etc.. <!--[if IE 7]> Special instructions for IE 7 here <![endif]-->
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: gap between img and div
I dont know why but IE is getting more and more problems with viewing web page properties. I think IE should be completely takes off and Firefox should come installed on every windows computer. But thats just my opinion. Too many spacifics with IE and its the only browser anyone has troubles with. Garbage.
|
|
||||
|
Re: gap between img and div
It unfortunately is a core component of the operating system. i.e. windows explorer or something.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
|
|
|||
|
Re: gap between img and div
yeah i use firefox and apparently microsoft's newest explorer is a cheap imitation of firefox.
i don't even want to include IE fixes, but tons-o-ppl use it, so I have to. grrr |
![]() |
| Tags |
| img white space |
| Thread Tools | |
|
|