Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I center with the div tag?

Posted on 2012-03-21
2
Medium Priority
?
229 Views
Last Modified: 2012-03-21
Hi, I want to center the right section on the top here that is next to the slideshow images on the left.  I defintely want the text, current edition, to be center to the space on the right.  How do I know how much space is left on the right side?  The total wideth is 800px.   How can I do that?  I tried the following div but it's not working.  Thank you.
http://keckmed.usc.edu/pp/


       <div style="width:350; margin: 0 auto;">
            <img alt="Keck Hospital" src="img/hospitals_header.jpg"/><br style="margin-top:20px"/><a href="http://www.usc.edu/hsc/info/pr/hospital_newsletter/index.html" style="font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#900">Current Edition</a>
            <br/>
            <hr style="width:370px"/>
            <img alt="TheWeekly" style="margin-top: 22px" src="img/TheWeeklyCover-2011.jpg"/><br style="margin-top:10px"/><a href="http://theweekly.usc.edu/1vol17/www11.html" style="font-size:14px; font-family:Arial, Helvetica, sans-serif; color:#900">Current Edition</a>
      </div>                                                      <br/>
0
Comment
Question by:lapucca
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
QPR earned 2000 total points
ID: 37749467
To center a div on screen you need
margin-left: auto ;
margin-right: auto ;
0
 

Author Closing Comment

by:lapucca
ID: 37749656
Thank you. I need those and this text-align:center and it's wroking now.  thank you.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Note:  There are two main ways to deploy InfoPath forms:  Server-side and directly through the SharePoint site.  Deploying a server-side InfoPath form means the form is approved by the Administrator, thus allowing greater functionality in the form. …
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question