www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > HTML

    HTML Discussion and technical support for building, using and deploying HTML sites.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 11-04-2009, 07:43 PM
    mick1027 mick1027 is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 1
    Trouble aligning multiple DIVs Horizontally

    please help me with the following. This is not a problem in Firefox; only in IE. I am having trouble centering one DIV with a DIV to the left of the centered DIV. The DIV that is blue I would like centered according to the browser width and the red DIV I would like the same vertically as the blue DIV only left justified. In Firefox this works correctly the way I would expect. In IE the left justified div appears "pushes" the DIV ( in blue ) that I want centered further to the right; making the DIV I want centered un-centered. thanks for any assistance.

    Code:
    <div width="100%">
    			<div align = "left" style="width:200px;float:left;background-color:#ff0000;">
    						<p style="font-size: 8pt;">This needs to be left justified........</p>
    						<p style="font-size: 8pt;">This needs to be left justified........</p>
    						<p style="font-size: 8pt;">This needs to be left justified........</p>
    			</div>
    		 <div align="center" style="background-color:#00ff00;">
    				<div style="width: 500px;background-color:#0000ff;">
    					<p style="font-size: 8pt;">this needs to be centered.................................................................................. </p>
    					<p style="font-size: 8pt;">this needs to be centered.................................................................................. </p>
    					<p style="font-size: 8pt;">this needs to be centered.................................................................................. </p>
    					<p style="font-size: 8pt;">this needs to be centered </p>
    				</div>
    		</div>
    Reply With Quote
      #2  
    Old 11-07-2009, 10:29 AM
    verikal verikal is offline
    Registered User
     
    Join Date: Nov 2009
    Posts: 17
    You need to add margin-left:200px; to the center block...

    Code:
    <div width="100%">
    	<div align="left" style="width:200px; float:left; background-color:#ff0000;">
    		<p style="font-size: 8pt;">This needs to be left justified........</p>
    		<p style="font-size: 8pt;">This needs to be left justified........</p>
    		<p style="font-size: 8pt;">This needs to be left justified........</p>
    	</div>
    	<div align="center" style="background-color:#00ff00; margin-left:200px;">
    		<div style="width:500px; background-color:#0000ff;">
    			<p style="font-size: 8pt;">this needs to be centered.................................................................................. </p>
    			<p style="font-size: 8pt;">this needs to be centered.................................................................................. </p>
    			<p style="font-size: 8pt;">this needs to be centered.................................................................................. </p>
    			<p style="font-size: 8pt;">this needs to be centered </p>
    		</div>
    	</div>
    </div>
    Reply With Quote
    Reply

    Bookmarks

    Tags
    alignment, divs


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    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
    Forum Jump


    All times are GMT -5. The time now is 08:00 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.