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

Reply
 
Thread Tools Display Modes
  #1  
Old 11-29-2009, 10:03 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Need quite a bit of CSS help please

Since I have an extreme lack of CSS knowledge, I need a little help on getting a couple of this straightened out correctly.

Basically what I did was rip the "table" code from the WGO box from the forumhome and edited it to about 50% of where I need it to be. The rest, I'm at a standstill (due to my lack of css knowledge). What I need to do, is put the "question" and "answer" in 2 columns, side-by-side, both aligned to the left with a 50% width and also, I need to change the space between "tables". I've also attached an image to show what I'm trying to do, along with the template and css code that I'm currently using.

Any help is greatly appreciated. The faster the help, the faster this will be released for vBulletin 4
Attached Images
File Type: jpg staffapp.jpg (36.8 KB, 0 views)
Attached Files
File Type: txt staff_template_backup.txt (15.7 KB, 4 views)
File Type: txt staff_css_backup.txt (2.6 KB, 4 views)
Reply With Quote
  #2  
Old 11-29-2009, 10:33 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't tell where I'm supposed to look in all that text.... anyway, did you try float:right on the box?
Reply With Quote
  #3  
Old 11-30-2009, 12:25 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
I can't tell where I'm supposed to look in all that text.... anyway, did you try float:right on the box?
Well, that wouldn't quite do what I need done. I need to have the form have 2 columns. The "questions" on one side aligned to the left in a 50% width column, and the "answers" on the other side aligned to the left in a 50% width column. Similar to what's seen in the screenshot here
Reply With Quote
  #4  
Old 11-30-2009, 01:04 AM
pein87's Avatar
pein87 pein87 is offline
 
Join Date: Sep 2008
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

there in a table? Why not assign a width for each table data with the first one being set to 100% and the other having a fixed width. Another solution is to make one on table data and an inner div to hold your radio buttons and use margin:left to space it to the other end. Of do an all div mark up which would enable various other styling abilities over a table.

You could use another table just for that one part like so

HTML Code:
<table>
<tr>
<td class="questions"> hhgfhfhfghfhfghfhf</td><td class="answers"><form><input type ="radio" /><label>Whats UP?</label><br /><input type ="radio" /><label>Whats UP?</label><br /><input type ="radio" /><label>Whats UP?</label><br /></form></td>
</tr>
</table>
CSS:

HTML Code:
table {	
width:100%;
height:auto;
}
td {
	padding:10px 10px 10px 10px;
	height:auto;
}
td.questions {
	width:50%;
	height:auto;
}
td.answers {
	width:50%;
	text-align:right;
}

Hope that helps you some.
Reply With Quote
  #5  
Old 11-30-2009, 01:24 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by pein87 View Post
there in a table? Why not assign a width for each table data with the first one being set to 100% and the other having a fixed width. Another solution is to make one on table data and an inner div to hold your radio buttons and use margin:left to space it to the other end. Of do an all div mark up which would enable various other styling abilities over a table.

You could use another table just for that one part like so

HTML Code:
<table>
<tr>
<td class="questions"> hhgfhfhfghfhfghfhf</td><td class="answers"><form><input type ="radio" /><label>Whats UP?</label><br /><input type ="radio" /><label>Whats UP?</label><br /><input type ="radio" /><label>Whats UP?</label><br /></form></td>
</tr>
</table>
CSS:

HTML Code:
table {	
width:100%;
height:auto;
}
td {
	padding:10px 10px 10px 10px;
	height:auto;
}
td.questions {
	width:50%;
	height:auto;
}
td.answers {
	width:50%;
	text-align:right;
}

Hope that helps you some.
No, there's no tables. I know how to do what you posted, but I'm trying to avoid tables and stick with vBulletin's new css layout
Reply With Quote
  #6  
Old 11-30-2009, 01:47 AM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, I just tried adding a little more css...
HTML Code:
#staffapp div.staffappcol {
	width: 50%;
	float: {vb:stylevar left};
}
and changed...
HTML Code:
			<div id="staffapp_options">
				<h3>{vb:rawphrase staffapp_position}</h3>
<vb:if condition="$vboptions['postitionapplying_mod_onoff']">
		<input type="radio" name="position_applying" value="Moderator" />{vb:rawphrase staffapp_mod}<br />
</vb:if>
<vb:if condition="$vboptions['postitionapplying_smod_onoff']">
		<input type="radio" name="position_applying" value="Super Moderator" />{vb:rawphrase staffapp_smod}<br />
</vb:if>
<vb:if condition="$vboptions['postitionapplying_admin_onoff']">
		<input type="radio" name="position_applying" value="Administrator" />{vb:rawphrase staffapp_admin}
</vb:if>
			</div>
to
HTML Code:
			<div id="staffapp_options">
		<div class="staffappcol">
				<h3>{vb:rawphrase staffapp_position}</h3>
		</div>
		<div class="staffappcol">
<vb:if condition="$vboptions['postitionapplying_mod_onoff']">
		<input type="radio" name="position_applying" value="Moderator" />{vb:rawphrase staffapp_mod}<br />
</vb:if>
<vb:if condition="$vboptions['postitionapplying_smod_onoff']">
		<input type="radio" name="position_applying" value="Super Moderator" />{vb:rawphrase staffapp_smod}<br />
</vb:if>
<vb:if condition="$vboptions['postitionapplying_admin_onoff']">
		<input type="radio" name="position_applying" value="Administrator" />{vb:rawphrase staffapp_admin}
</vb:if>
		</div>
			</div>
and it worked, but it broke it at the same time (see attachment). what am I doing wrong?
Attached Images
File Type: jpg broken.jpg (17.7 KB, 0 views)
Reply With Quote
  #7  
Old 11-30-2009, 02:01 AM
pein87's Avatar
pein87 pein87 is offline
 
Join Date: Sep 2008
Posts: 352
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

try this should work used inner div for spacing floats and a 1px clear:both div to clear the floats. color addded so you can test it as a regular html page first. You can use one float since everything will wrap around the floated object until cleared but your signs would look messy. you could also use two divs on main div set to position:relative; and the inner div set to position: absolute; and set right:5px; to set it spaced 5 pixels from the right and it should keep 50% of the parent divs width. I haven't tested it but its possible if this version doe not work.

HTML:

Code:
<div class="container">
	<div class="q">
		<div class="spacer">dasda</div>
	</div>
	
	<div class="a">
		<div class="spacer">dasda</div>
	</div>
	<div class="endFloat"></div>
</div>
CSS:

Code:
div.container {
	height:auto;
	width:100%;
}
div.q {
	width:50%;
	float:left;
	background-color:fuchsia;
}
div.a {
	width:50%;
	float:right;
	text-align:right;
	background-color:aqua;
}
div.spacer {
	padding:5px;
}
div.endFloat {
	width:100%;
	height:1px;
	clear:both;
}
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 05:10 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.03974 seconds
  • Memory Usage 2,266KB
  • 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
  • (2)bbcode_code
  • (7)bbcode_html
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (7)post_thanks_box
  • (7)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (7)post_thanks_postbit_info
  • (7)postbit
  • (4)postbit_attachment
  • (7)postbit_onlinestatus
  • (7)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_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete