Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Elements not floating next to one another, despite adequate space

Posted on 2013-06-28
3
Medium Priority
?
210 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Kim Walker earned 2000 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 59

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
Suggested Courses

721 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