Current location: Hot Scripts Forums » General Web Coding » CSS » how to align center for some divs


how to align center for some divs

Reply
  #1 (permalink)  
Old 01-10-11, 05:17 AM
Leafgreen's Avatar
Leafgreen Leafgreen is offline
Newbie Coder
 
Join Date: Feb 2008
Location: C:\Wonderland
Posts: 54
Thanks: 5
Thanked 0 Times in 0 Posts
X_X how to align center for some divs

I am trying to get a row of mixed divs to align horizontally center on the page. I would also like to move the Google Checkout logo up a bit so it is vertically centered relative to the logos on that row. Can you help me do these things? TIA! I've tried doing a lot of things including profanity but no go. The attached screenshot is how the page looks now with this css:
Code:
.row div
{
height:75px;
float:left;
}
#AuthorizeNetSeal,#googleCheckoutLogo,#paypal
{
margin-top:25px;
}
and this html:
HTML Code:
<div class="row">

<!-- (c) 2005, 2011. Authorize.Net is a registered trademark of CyberSource Corporation --> <div class="AuthorizeNetSeal"> <script type="text/javascript" language="javascript">var ANS_customer_id="xxxxxxxx";</script> <script type="text/javascript" language="javascript" src="//verify.authorize.net/anetseal/seal.js" ></script> <a href="http://www.authorize.net/" id="AuthorizeNetText" target="_blank">Online Payment Service</a> </div>

<img src="http://www.hotscripts.com/forums/images-manual/small_cc_icon_discover.gif" >

<div><!-- Begin Official PayPal Seal --><a href="https://www.paypal.com/us/verified/pal=xxxxxxxxxxx" target="_blank"><img src="https://www.paypal.com/en_US/i/icon/verification_seal.gif" border="0"></A><!-- End Official PayPal Seal --></div>

<div id="googleCheckoutLogo"></div><script src='https://checkout.google.com/buttons/logos?merchant_id=xxxxxxxxxxxx&loc=en_US&f=png' ></script>

<span id="siteseal"><script type="text/javascript" src="https://seal.godaddy.com/getSeal?sealID=xxxxxxxx"></script></span>

<img src="http://www.hotscripts.com/forums/images-manual/100satisguar80x79.gif">
</div>
Attached Images
File Type: jpg 1-10-2011AM.jpg (14.4 KB, 302 views)

Last edited by Leafgreen; 01-10-11 at 05:20 AM.
Reply With Quote
  #2 (permalink)  
Old 02-01-11, 06:44 AM
bestwebdesigner bestwebdesigner is offline
New Member
 
Join Date: Feb 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Hi,
In order to center the elements in your div use text-align :center.
Code:
.row 
{
height:75px;
text-align:center;
width:auto;
}
Reply With Quote
  #3 (permalink)  
Old 03-05-11, 05:54 PM
_matt1313 _matt1313 is offline
Newbie Coder
 
Join Date: Dec 2010
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
can you post a link and the full source
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Divs not stretching? sdd CSS 7 07-27-10 05:11 AM
[SOLVED] Center align .swf with overflow kcorbishley CSS 5 04-07-10 12:45 PM
Content of a div affecting links in other divs? sdd CSS 5 03-27-10 02:37 AM
Div:s and position? BT-loader CSS 2 05-30-09 11:59 AM
browser only renders font size change, no color, etc. labelle CSS 3 03-30-09 01:41 AM


All times are GMT -5. The time now is 04:44 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.