Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2011, 09:22 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Need a little help with CSS...

Ok, so I'm getting back into the swing of things from being away from vBulletin for quite awhile, and playing around with making a new mod/page at the moment, however from my present point, I can't figure out how to make it 2 columns. It took me several hours just to get where you see in the picture lol. Where the line is with the arrows is where I'm trying to split it at, so I would have text on both sides of that line. Now, in vBulletin 3.x, I know it was as simple as something like this...
HTML Code:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
	<tr valign="top">
		<td class="alt1" nowrap="nowrap">
		TEXT HERE
		</td>
		<td class="alt2" width="100%">
		MORE TEXT HERE
		</td>
	</tr>
</table>
But if I use that, I can't seem to keep all my nice borders and whatnot shown in the picture.

And here's my current CSS....
Code:
@charset "UTF-8";
/* CSS Document */

.usmlsablock {
	margin-bottom:1em;
}

.usmlsatext {
	border-bottom:solid 1px {vb:stylevar light_border.borderColor};
}

.usmlsablock .blockbody {
	border-left:{vb:stylevar tabslight_border};
	border-right:{vb:stylevar tabslight_border};
	border-bottom:{vb:stylevar tabslight_border};
}

.usmlsashadow {
	-moz-box-shadow: -2px 2px 2px {vb:stylevar forumbits_shadow_color};
	-webkit-box-shadow: -2px 2px 2px {vb:stylevar forumbits_shadow_color};
}
So....any advice would be greatly appreciated!
Attached Images
File Type: jpg newpage.jpg (29.4 KB, 0 views)
Reply With Quote
  #2  
Old 03-16-2011, 09:31 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

AFAIK, you can't make columns with CSS. I had to revert to using tables and TDs to accomplish that.
Reply With Quote
  #3  
Old 03-16-2011, 09:58 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It must be possible to do without tables and tds as I haven't found either in the template for the picture below....unless I'm mistaken and it's being called somehow from somewhere. But basically, I'm trying to achieve this.....or at least I hope this is set up the same way....
Attached Images
File Type: jpg columns.jpg (13.9 KB, 0 views)
Reply With Quote
  #4  
Old 03-16-2011, 10:17 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You may be right. Take a look at the forumrules template and see how they are using CSS to accomplish that.

EDIT: I remember why I couldn't do it that way now. I needed to have the right side line up to the left when the left side line length changed. I have to use a tables and TDs to accomplish that as the forumrules way wouldn't do it like I needed it to.
Attached Images
File Type: png events.png (8.3 KB, 0 views)
Reply With Quote
  #5  
Old 03-16-2011, 10:37 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, now my next question, is there a way to do that and keep all the properties shown in the first image? (the outside border, the shadow, etc)
Reply With Quote
  #6  
Old 03-16-2011, 10:40 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you mean with the CSS on the forumrules way? I have no idea, sorry.
Reply With Quote
  #7  
Old 03-16-2011, 10:49 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I mean using tables and tds and also keeping the shadow and borders shown in the 1st image
Reply With Quote
  #8  
Old 03-16-2011, 10:59 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would think you would be able to do that just fine, although I have not tried it yet. Others have been adding shadows to tables in vb 3 so I'm sure it can be done.
Reply With Quote
  #9  
Old 03-16-2011, 07:47 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've done it!!! Looks good, but I'm sure the code could be cleaned up a little more. ALMOST back in the swing of things, but lots more to learn again
Attached Images
File Type: jpg tables.jpg (27.3 KB, 0 views)
Reply With Quote
  #10  
Old 03-16-2011, 09:05 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Care you share how you did it?
Reply With Quote
Reply

Thread Tools
Display Modes

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 01:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05425 seconds
  • Memory Usage 2,283KB
  • Queries Executed 14 (?)
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
  • (1)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete