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 03-09-2009, 04:33 PM
Phantasmagoric Phantasmagoric is offline
 
Join Date: Feb 2009
Location: United Kingdom
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Graphic central alignment problem

I'm having trouble getting some graphics to align centrally in both IE and FireFox and I need to ask for some help please.

If you look at my main site in IE6/7 the top block and logo block are aligned, but if you view it in FireFox there is a drift to the right!
http://skins4forums.com/vbskins/index.php

I am using this as the html:

Code:
    <div id="top_block">    
        <div class="top-l"></div>
        <div class="top-m"></div>
         <div class="top-r"></div>
         <div id="topbar"><div style="text-align:center"><img src="$stylevar[imgdir_misc]/top-tag.gif" border="0" alt="" /></div></div>
    </div>

and this as the css:

Code:
/* top cells ================================== */
#top_block {
    margin: 0px;
    margin-left: auto;
    margin-right: auto;
    padding: 0px;
    width: 100%;
    clear: both;
}

#topbar {
    background-repeat:no-repeat;
    background-position:center;
    width: auto;
    height: 36px;
    padding: 0px;
    margin: -36px 0px 0px 0px;
}

.top-l {
    background-image: url(images/skins/finite/misc/top-l.gif);
    background-repeat: no-repeat;
    float: left;
    height: 36px;
    width: 70px;
    padding: 0px;
    margin:0px;
}

.top-m {
    background-image: url(images/skins/finite/misc/top-m.gif);
    background-repeat: repeat;
    height: 36px;
    margin: 0px 70px 0px 70px;
    width: auto;
    padding: 0px;
}

.top-r {
    background-image: url(images/skins/finite/misc/top-r.gif);
    background-repeat: no-repeat;
    height: 36px;
    float: right;
    margin-top:-36px;
    width: 70px;
    padding: 0px;
}
/* ================================================================================ */
I am trying to make my Skins play nice in IE6, the result ends up as FireFox wont play nice now, the top-tag img drifts over to the right in FireFox.
The same applies for the logo block!

Can anyone see what I'm getting wrong?
Reply With Quote
  #2  
Old 03-09-2009, 05:37 PM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have to admit I haven't really screened all of the code, however this seems to work:
Code:
#logo {
background-repeat:no-repeat;
height:105px;
margin:-105px 0px 0px -70px;
padding:0;
width:100%;
}
#topbar {
background-repeat:no-repeat;
height:36px;
margin:-36px 0px 0px -70px;
padding:0;
width:100%;
}
PS. if you use FF, install Firebug. It's a lifesaver
Reply With Quote
  #3  
Old 03-09-2009, 06:19 PM
Phantasmagoric Phantasmagoric is offline
 
Join Date: Feb 2009
Location: United Kingdom
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have firebug, it's not telling me anything I can use.

Adding the -70px will cause problems in IE, this I have been trying to figure out for 3 days now, nothing I do works, it's a real hair puller bug, and no-one on some webmaster sites seem able to resolve either, I'm well stuck!
Reply With Quote
  #4  
Old 03-09-2009, 07:50 PM
Taragon's Avatar
Taragon Taragon is offline
 
Join Date: Sep 2007
Location: The Netherlands
Posts: 390
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1st of all, please try this on a child style first, since I'm not exactly sure it'll work at your board.
I've changed the class and id names a bit for my personal use only.

Put this between your wrapper:
Code:
<div class="top_lft"></div><div class="top_rht"></div><div class="top_x"></div>
<div class="header_lft"></div><div class="header_rht"></div><div class="header_x"></div>
<div class="btm_lft"></div><div class="btm_rht"></div><div class="btm_x"></div>
CSS
Code:
.top_lft {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/top-l.gif) no-repeat;
float:left;
height:36px;
margin:0;
padding:0;
width:70px;
}
.top_rht {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/top-r.gif) no-repeat;
float:right;
height:36px;
margin:0;
padding:0;
width:70px;
}
.top_x {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/top-tag.gif) repeat-x scroll center top;
height:36px;
margin:0;
padding:0;
}
.header_lft {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/logo-l.gif) no-repeat;
float:left;
height:105px;
margin:0;
padding:0;
width:70px;
}
.header_rht {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/logo-r.gif) no-repeat;
float:right;
height:105px;
margin:0;
padding:0;
width:70px;
}
.header_x {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/logo.gif) repeat-x scroll center top;
height:105px;
margin:0;
padding:0;
}
.btm_lft {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/mft-l.gif) no-repeat;
float:left;
height:28px;
margin:0;
padding:0;
width:200px;
}
.btm_rht {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/mft-r.gif) no-repeat;
float:right;
height:28px;
margin:0;
padding:0;
width:200px;
}
.btm_x {
background:#000000 url(http://skins4forums.com/vbskins/images/skins/finite/misc/mft-m.gif) repeat-x scroll center top;
height:28px;
margin:0;
padding:0;
}
About Firebug, it's a great inline editor
Reply With Quote
  #5  
Old 03-09-2009, 08:43 PM
Phantasmagoric Phantasmagoric is offline
 
Join Date: Feb 2009
Location: United Kingdom
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works perfectly with IE6/7, FF, Opera, Safari and Google Chrome, needed to add an id div to each to compensate for that weird 3px border bug in IE6:

Like this:
Code:
<div id="topfill"><div class="top_lft"></div><div class="top_rht"></div><div class="top_x"></div></div>
Code:
#topfill {background:#000000 url(images/skins/finite/misc/top-tag.gif) repeat-x scroll center top;}
Now all of them are happy, you have been a life saver Cor, thank you very much for your wonderful help, I appreciate it immensely.
Reply With Quote
  #6  
Old 03-10-2009, 07:30 AM
Phantasmagoric Phantasmagoric is offline
 
Join Date: Feb 2009
Location: United Kingdom
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ah, well actually, after trying to apply these changes to my Dynasty Skin (a white skin) I found that the code isn't quite what I wanted it to be.

Sorry, I obviously wasn't being as clear as i should have been, my fault.

I need the logo to be an active link as it is in the default skin, the solution you gave me is using the logo itself as a tiling image, that's not quite right, and the top block is using the top-tag as a tiling image, I can see how that got confused by my poor explanation.

I will add two images here to better demonstrate what I need those two blocks to do, the first will be the two blocks as a fixed width, the second image is those same two blocks as a fluid layout.

In the fluid layout you can see the top-m.gif and the logo-m.gif acting as tiling images 'behind' the rest of the layout.

I've been trying to alter you solution to better suit how I need it to work but everything I try to do I just make a mess of it all, could I ask you to look at this again for me please?
Attached Images
File Type: gif fixed.gif (6.9 KB, 0 views)
File Type: gif fluid.gif (8.0 KB, 0 views)
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 06:37 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.05612 seconds
  • Memory Usage 2,241KB
  • Queries Executed 12 (?)
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
  • (7)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete