vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Design and Graphics Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=253)
-   -   3 column design css problem (https://vborg.vbsupport.ru/showthread.php?t=260940)

Adan0s 03-25-2011 06:37 PM

3 column design css problem
 
I'm currently trying to port my new design to vB 4.1.2
  1. Header is fixed over 100%
  2. left and right there are specific images which are each 139px wide
  3. the body_wrapper itself should be between those both graphics, always fit the browser width

It looks generally something like this (won't show my final design here):
http://www.adan0s.de/misc/template.png

At the moment I added two div-layer before body_wrapper and after above_body.

HTML Code:

<body>
<div class="above_body">

<div id="bg_left"></div>
<div id="bg_right"></div>

<div class="body_wrapper">
<div class="below_body">
...

The css code looks like this:

Code:

#bg_left {
background-image: url(bg_left.png);
width: 139px;
height: 600px;
float:left;
}
#bg_right {
background-image: url(bg_right.png);
width: 139px;
height: 600px;
float:right;
}

.body_wrapper{
margin-left: 139px;
margin-right: 139px;
min-height: 600px;
}

Unfortunately due to the massive CSS-amount of vB it just greatly messes up the inner style of the body_wrapper probably because of the floats.

https://vborg.vbsupport.ru/external/2011/03/7.png

As you can see the whole content itself starts after the 600px of the two bg_left/right.
Someone here who actually managed to realise such a layout?

greetings,
Adan0s

TheLastSuperman 03-25-2011 10:16 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=255222" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=255222</a>

Now on that note, I have noticed depending on what side you want the third "column" that it can give you styling issues so I have admittedly used tables/td code to do this as well w/o any issues.

Adan0s 03-29-2011 02:26 PM

Thank you for your answer.
Unfortunately none of those tricks did help.
I really don't know what to do now. I'm pretty firm with CSS but due to the fact that there are like 10000000 styles are taking action I just don't get it. And I really don't want to mess around with tables.

Lynne 03-29-2011 04:06 PM

Can we get a link? It's really hard to figure out CSS issues just from an image.

Adan0s 03-29-2011 06:59 PM

Aye, good point.

-link removed-

I found a workaround which fixes the issue. If you look closely even though the content is aligned correctly it starts right after the background-images end (600px).
So, if I add "margin-top: -600px" to the body_wrapper it works as it should. But as you might figure that's a really...bad fix.

Lynne 03-30-2011 02:33 AM

The problem is the height you are giving to the side divs. Are those only there to add the image background? Why not just add the image to the actual background CSS? If you google "3 column CSS layout", you'll get a lot of information about what you need to do to get it to work. Your's works fine without the height, so your problem is specific to that and you'll have to try to narrow your searching down to that.

Adan0s 03-30-2011 03:44 PM

Thank you. I used an other 3 column css layout and now everything works (even though chrome12 shows an error, but that might depend on the dev version).

I used the following layout: http://www.alistapart.com/articles/holygrail/
and wrapped it around the body_wrapper.

Lynne 03-30-2011 04:46 PM

Glad you got it figured out. :)


All times are GMT. The time now is 01:31 PM.

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.01012 seconds
  • Memory Usage 1,727KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete