Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Design and Graphics Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-03-2007, 01:40 AM
Tact7626 Tact7626 is offline
 
Join Date: Feb 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Where's this space coming from? (CSS question)

Hi again. I hope I don't seem annoying with all my questions. (I think this is my 3rd thread O_o)

I tried finding articles and solutiosn online, but none were helpful. The closes match was possibly the box model ie issue. but that's like ie5 only or something. O_o


Anyway. Maybe you guys can help me figure this out. I have like over 2 hours on this. >.<


Code:
<div style="
border:1px dotted black; 
width:400px;height:40px;
padding:0px;
margin:0px;
float:right;
background-image:url('http://www.legionofangels.net/forum/images/styles/brown/cruxnail.gif');
background-repeat: no-repeat;
background-position:center;">

<!-- controls -->


<if condition="$post['editlink']">
<img style="display: none" id="progress_$postid" src="$stylevar[imgdir_misc]/progress.gif" alt="$vbphrase[loading_editor_please_wait]" />

<div style="margin-top:0px;padding-top:0px;width:45px;height:17px;border:0px solid red;position:relative;left:25px;float:left;overflow:hidden;">
<a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="images/style/brown/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a>
</div>
</if>
ok. basically, this part of the control code in the postbit template. mostly just the first button is being shown since all buttons are giving me the exact same problem and ONLY in IE6 (have not tested opera and i pray it works in that lol)


THE PROBLEM:

ok. the problem is that, i have setup margin-top and padding-top to be 0 on both the wrapper div, and divs encasing each button. and yet, there is a space above the image in internet explorer. Firefox displays it as it should. i have borders for easy identification.



here you can see, the red div. you can see my tiny "edit" button inside it. (it has the same bg as the texture of the nail so you might have trouble telling where it starts and where it ends) but its like 49x7 pixels in size. and it's not touching the top as it should.

i need to correct this before i decide to move all the buttons back down to the center of the nail.


here's the correct way in firefox. (i never thought i'd see the day my beloved ie would give me headaches. )



actually. you might technically call this a problem too (if it had that empty space at the bottom on its own, which sometimes you might get), but since i already setup overflow:hidden and specified height and width, it's no problem at all. i'd simply shrink the height, and the div would wrap the button perfectly problem solved.


however. since the space is at the top of the gif, instead of the bottom, (which i've never seen ever! O_o) i have no idea how to fix it! i can't use overflow:hidden and then specify height. border=0 is already applied to the image. margins are set. padding is set. what am i missing?


is the anchor tag adding something? i thought only <p> and <h1> tags had margin problems and stuff. >.<


any help is greatly appreciated. the goal is to get rid of the top space and have the gif touch the top of the outer wrapper div.

thank you for your time.
Reply With Quote
  #2  
Old 05-03-2007, 02:16 AM
Mythotical Mythotical is offline
 
Join Date: Jun 2004
Location: Booneville, AR, USA
Posts: 1,428
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure but play with the height a bit, also, make sure your buttons have a transparent background with no pixels above or below it.
Reply With Quote
  #3  
Old 05-03-2007, 02:03 PM
Tact7626 Tact7626 is offline
 
Join Date: Feb 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you for your reply, Steve.

I think i will play with the height a bit more after turning off overflow:hidden. because if i leave it on, it will shrink, but the image will stay put and not fix itself. and the wierd thing was, when i specified height without overflow, the div would basically not even obey. >.<


and i'm not understanding your second tip. if you mean, make sure there isn't transparent space in my gif, then yes. i'm sure there is no transparent space in my gif creating that space. i don't understand how adding or taking away the bg of the gif would help. i just know that i put one there because the text will look ugly if i try to make a transparent gif because the text is so small and gif's can't do alpha layers. so i kinda need it. once the buttons are in position, you won't be able to tell the diffrence. but i can't put them in position yet because the positions between IE and FF don't match.

so i'm trying to get IE to match FF and i can't figure out why it won't.

i was wondering what kind of doctype vbulletin uses. maybe some custom one. cause i know a doctype can change the way certain css/html behaves. hmm...







EDIT!!::

I have an update. (didn't want to make a double post)

I solved the problem! here's what i did. after testing a LOT of diffrent possible solutions, I then looked up what i can do to the image itself. since nothing i do to the div was working at all. and after a couple attempts at margin and positioning, the winner ended up being this one.

Code:
<img src="images/style/brown/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" style="vertical-align:top;" />
it should be in bold. i never though i could do style inside an image itself!! i'm glad i can. otherwise, i'd never have solved this. ;_;


i hope this helps other people too.


check it out. i'm so happy i'm finally done with this.


this is the control in the postbit. looks like a crucifix nail to show what our Lord Jesus went through to save us all. ;_;

nail was done by my friend, Omega. (owner of the site). I just sliced it and coded it into the vb.
Reply With Quote
  #4  
Old 05-05-2007, 02:11 PM
cyberphr's Avatar
cyberphr cyberphr is offline
 
Join Date: Jul 2006
Location: Hell
Posts: 293
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You haven't used a CSS.

Use an element in the image, for example:
HTML Code:
.yourimage {
display: block;
}
Reply With Quote
  #5  
Old 05-07-2007, 03:21 AM
Tact7626 Tact7626 is offline
 
Join Date: Feb 2007
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

really? i put this in the image tag. i thought it was css. plus it worked. lol

Quote:
style="vertical-align:top;"
you're idea might work too, but since i fixed it already, i've no need to apply it. but i will remember it though since that's better than doing this for multiple images. O_o
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:18 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03746 seconds
  • Memory Usage 2,207KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete