runnerjp Posted February 22, 2007 Share Posted February 22, 2007 no matter how much i try i cant align to the right!! any idea why ( yes i know its really easy lol but im learning and been readin books like advised but in them this is supposed to work :S) <body> <div id="logo"><img src="http://www.runnerselite.com/images/LOGO.jpg" width="750" height="100" alt="RunnerElite logo"/> </div> <div id="runnerlogo"> <img src="http://www.runnerselite.com/images/runner.jpg" alt="Runner Logo"/></div> <div id="info"> <?include("include/info.inc.php");?> </div> what i wanna do is align <?include("include/info.inc.php");?> to the right of my logo! yet when i add <P ALIGN="RIGHT"> it does nothin :S Quote Link to comment Share on other sites More sharing options...
runnerjp Posted February 22, 2007 Author Share Posted February 22, 2007 here is css stuff div#logo {text-align:center;margin-top:0;} div#runnerlogo {margin-top:-9%; margin-left:3%;} div#info {margin-top:-9%; margin-right:10%;} Quote Link to comment Share on other sites More sharing options...
lando Posted February 22, 2007 Share Posted February 22, 2007 Are you wanting to align the entire div#info to the right of the logo or just the content of div#info right? That is two different things... If you want to align the content of div#info use text-align:right; in your css. If you are wanting the entire div#info to align right of div#logo then you will need to use floats. XHTML <div id="logo"> <img src="http://www.runnerselite.com/images/LOGO.jpg" width="750" height="100" alt="RunnerElite logo"/> </div> <div id="runnerlogo"> <img src="http://www.runnerselite.com/images/runner.jpg" alt="Runner Logo"/> </div> <div id="info"> <?include("include/info.inc.php");?> </div> <div class="clear"></div> CSS div#logo { float: left; text-align:center; margin-top:0; } div#runnerlogo { float: left; margin-top:-9%; margin-left:3%; } div#info { float: left; margin-top:-9%; margin-right:10%; } div.clear { clear: left; } This is just ONE of many ways to do it. This method floats all three boxes left and then clears the floats with div.clear. Floats can be very tricky for a beginner so I HIGHLY suggest you do some reading on them and fully understand how they work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.