471,599 Members | 1,227 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,599 software developers and data experts.

Div Inline Positioning

162 100+
In the code below you see i have a container div. Inside of that are two divs. I would like the two divs to align side-by-side and valign to the top of the container div.

I can get them side-by-side, but not to valign both to top. What am i doing wrong?

Expand|Select|Wrap|Line Numbers
  1. <div class="" style="width:530px; border-width:1px; border-style:solid; border-color:#ccbbaa; text-align:left; padding:10px;">
  2.  
  3.     <div class="" style="position:relative; z-index:7; width:300px;">
  4.  
  5.         Epsum factorial non deposit quid pro quo hic escorol. Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum. Defacto lingo est igpay atinlay. Marquee selectus non provisio incongruous feline nolo contendre. Gratuitous octopus niacin, sodium glutimate. Quote meon an estimate et non interruptus stadium. Sic tempus fugit esperanto hiccup estrogen. Glorious baklava ex librus hup hey ad infinitum. Non sequitur condominium facile et geranium incognito. Epsum factorial non deposit quid pro quo hic escorol. Marquee selectus non provisio incongruous feline nolo contendre Olypian quarrels et gorilla congolium sic ad nauseum. Souvlaki ignitus carborundum e pluribus unum.
  6.  
  7.     </div>
  8.  
  9.     <div class="" style="position:relative; z-index:6; width:200px; left:320px;"><IMG src='test.jpg' width='125'></div>
  10.  
  11. </div>
  12.  
Oct 4 '07 #1
3 2326
drhowarddrfine
7,435 Expert 4TB
You are seeing the <body> margin. Just do:
body{margin:0} in CSS.
Oct 4 '07 #2
empiresolutions
162 100+
This solution for this problem can be found using either of the suggestions found here,
<snip>
Nov 14 '07 #3
drhowarddrfine
7,435 Expert 4TB
You would have found my solution worked just fine and was much simpler.
Nov 14 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Jane Withnolastname | last post: by
1 post views Thread by Christoffer Berg | last post: by
4 posts views Thread by invinfo | last post: by
8 posts views Thread by yb | last post: by
10 posts views Thread by Neo Geshel | last post: by
5 posts views Thread by CES | last post: by
15 posts views Thread by Aaron Gray | last post: by
18 posts views Thread by hendedav | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.