Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Liquid Layout Trouble
Old 01-05-2012, 04:17 AM Liquid Layout Trouble
Novice Talker

Posts: 14
Location: UK
Trades: 0
Hi All,

Having a little bit of trouble with a new WIP layout and tearing my hair out with a simple problem - http://www.jameshenry.info/test/video.php?video=13

I'm looking for my video content box to be centred within the main containing frame - Normally I'd use 'margin-left: auto; margin-right: auto;' to do this, and this is what I'm trying to use at the moment, it just doesn't seem to be working!?!!

Here is my CSS:


Code:
.rightbar {
	width: 100%;
	margin-left: auto;
  	margin-right: auto;
}

.videobox {
	width: 657px;
	height: 435px;
	background-color: #FFFFFF;
	-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
	-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
	-webkit-border-radius: 3px;
	-moz-border-radius: 3px;
	border-radius: 3px;
	text-indent: 9px;
	padding-top:9px;
	padding-bottom: 9px;
}
And then I am organising content like this:

Code:
<div class ='rightbar'><div class='videobox'>VIDEO HERE</div></div>
Anybody know where I am going wrong here?!
hj8ag is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-05-2012, 06:58 AM Re: Liquid Layout Trouble
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
You've put the margin on the .rightbar class (which has 100% width, so there won't be any margin at all), surely you'll want the margin on the .videobox class.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Old 01-05-2012, 08:50 AM Re: Liquid Layout Trouble
Novice Talker

Posts: 14
Location: UK
Trades: 0
haha, I knew it was something so stupid.

Thanks so much, Not sure why I didn't notice this.
hj8ag is offline
Reply With Quote
View Public Profile
 
Old 01-13-2012, 12:00 PM Re: Liquid Layout Trouble
Junior Talker

Posts: 1
Trades: 0
you can use
Code:
margin:auto;
too instead of one for each side
secondsighting is offline
Reply With Quote
View Public Profile Visit secondsighting's homepage!
 
Old 01-13-2012, 07:22 PM Re: Liquid Layout Trouble
lizciz's Avatar
Super Spam Talker

Posts: 807
Name: Mattias Nordahl
Location: Sweden
Trades: 0
Quote:
Originally Posted by secondsighting View Post
you can use
Code:
margin:auto;
too instead of one for each side
Not entirely true, depending on the situation of course. Using margin: auto; would set automatic margin on all four sides (top, right, bottom and left). If the OP wishes the top and bottom margin to stay unchanged (these could be set else where) the left and right margin must be set individually.
__________________
Your answers will only be as good as your question. Formulate it well and give all the necessary information.
lizciz is offline
Reply With Quote
View Public Profile Visit lizciz's homepage!
 
Reply     « Reply to Liquid Layout Trouble
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.38364 seconds with 12 queries