Solved

Elements not floating next to one another, despite adequate space

Posted on 2013-06-28
3
204 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 54

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This is a how to build your own CSS3 slideshow and when I say CSS3 I mean just CSS with no javascript in sight! There a few examples online of how to do this but most just show you an example without any explanation, others make it more complicat…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

770 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