Solved

Elements not floating next to one another, despite adequate space

Posted on 2013-06-28
3
202 Views
Last Modified: 2013-06-28
Test page:
http://partnersdesign.net/test

Please click "Partners Design, Inc." at the top. The block with the gray, yellow, blue and green backgrounds should be aligning to the right of the red background. It looks like there is enough space. This was working previously, but I messed something up. I am having trouble seeing what is wrong, I would really appreciate another set of eyes.

HTML:

<ul id="nav2" class="nomobile">
			<li id="nav2bt1" class="nav2hl">ABOUT</li>
			<li id="nav2bt2">PARTNERS</li>
			<li id="nav2bt3">AWARDS</li>
			<li id="nav2bt4">STUDIO</li>
		</ul>

		<div id="contentarea1" class="contentarea">
			<div class="contentquotetag nomobile">01.<br />
				LAURETTA DIVES<br />
				Owner<br />
				<i>The Picture Desk</i></div>
			<div class="contentquote nomobile clearfix">
				<i>&ldquo;The branding has been extremely successful and, although it was created some years back, we have not felt the need to update it significantly, as the look is so classic.&rdquo;</i>
			</div>

			<img class="closebutton yesmobile" src="img/gr_x.png" border="0" />

			<h3>WHO BETTER TO START A GREAT PARTNERSHIP THAN IDENTICAL TWIN BROTHERS?</h3>

			<p>text...</p>
		</div>

Open in new window


CSS:

ul#nav2{float:left;margin:0;padding:12.6em 0 0 0;background-color:#c00;}
ul#nav2 li{display:block;width:116px;height:26px;margin:0;padding:4px 0 0 36px;font-family:'alternate_gothic_fs_no_2Rg',Arial,Helvetica,sans-serif;font-size:1.3em;letter-spacing:1px;cursor:pointer;}
ul#nav2 li.nav2hl{background:transparent url('../img/gr_btbg.png') no-repeat top left;}
ul#nav2 li.nav2mouseover{background:transparent url('../img/gr_btbg.png') no-repeat top left;}

div.contentquote{width:530px;height:7em;padding:1em 40px 9px 24px;margin:0 0 3em -1em;background:transparent url('../img/gr_quotebg.png') no-repeat top left;color:#000;font-size:1.1em;line-height:2;text-indent:-0.5em;background-color:#00c;}
div.contentquotetag{float:right;margin-top:2.3em;font-size:0.7em;line-height:1.6;text-indent:0;width:156px;letter-spacing:1px;background-color:#0c0;}

div.contentarea{float:right;width:52em;margin:0 10em 0 0;background-color:#ccc;}

Open in new window


Thank you!
0
Comment
Question by:bbdesign
3 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 500 total points
ID: 39284131
The 10em right margin for class contentarea is pushing contentarea1 away from the right side. (Line 222 of main.css) You need to either remove that margin or set contentarea1 to zero right margin.
0
 
LVL 52

Expert Comment

by:Julian Hansen
ID: 39284148
main.css line 222 is where the problem is
div.contentarea {
  background-color: #CCCCCC;
  float: right;
  margin: 0 10em 0 0;
  width: 52em; /* <=== TOO MUCH HERE */
}

Open in new window


em is proportional so you might have changed something higher up the hierarchy which caused the div to be wider.
0
 

Author Comment

by:bbdesign
ID: 39284256
Ah, thank you so much!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Urgent need help ASAP With CSS 5 37
jquery add something to a div 4 37
I can't get this footer to "stick" to the bottom! Why not? 4 19
Target h5 of a div 3 0
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
This article discusses four methods for overlaying images in a container on a web page
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

914 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now