Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 377
  • Last Modified:

Why is my text floating to the right?

I have a site mockup here: http://www.kellercrescentdigital.com/lmh/about/ceo-message

and the text on the first line wants to flow to the right. I've tried clearing the floats on the contentheading and buttonheading elements but it just makes it worse.

What am I doing wrong here?
select {font-size: 11px; color: #336699; border: #336699 1px solid; font-family:Tahoma, Arial, Helvetica, Geneva, sans-serif; background: #ffffff; }
 
#searchbox {
 position: absolute;
 top: 6px;
 left: 260px;
}
.searchme {
    font-size: 13px;
    height: 18px; 
    color: #336699; 
    border: #336699 1px solid; 
    font-family:Tahoma, Arial, Helvetica, Geneva, sans-serif; 
    background: #ffffff url(../images/searchme.gif) no-repeat left center; 
    padding-left: 25px;
    margin-top: 2px;
}
.gn_header_1 {
 color: #336699;
}
#latestnews {
  float: left;
  width: 200px;
  height: 225px;
}
#latestevents {
  float: right;
  width: 200px;
  height: 225px;
  padding: 5px;
  color: #336699;
  font-weight: bold;
}
.componentheading {
  color: #336699;
  font-size: 20px;
  font-weight: bold;
}
img, div { 
      behavior: url(/lmh/templates/LogansPort_Memorial_Hospital/iepngfix.htc) 
}
 
h1 {
      color: #4a6171;
      font-size: 20px;
   }
 
#wrapper {
	width: 779px;
	margin: 0 auto; /* centering the page */
	text-align: left;
	}
#container {
      background: #fff;
      height: 100%;
      overflow: auto;
      width: 100%;
}
#header {
      background: #fff;
	height: 34px;
	margin: 0 auto; /* centering the page */
	padding: 0; 
	}
#left {
      background: #fff;
	float: left;
	width: 200px;
      background: #fff url(../images/left_bg.png) repeat-x top;
      margin: 5px;
      padding: 10px;
      height: 100%;
	}
#content {
      background: #fff;
	float:left;
      padding: 20px;
      height: 100%;
      width: 739px;
      min-height: 400px;
	}
#footer {
     clear: both;
     background: url(../images/bg_footer.png) no-repeat top;
     color: #024886;
     font-size: 10px;
     height: 25px;
     width: 780px;
}
#footleft {
     width: 300px;
     float: left;
     padding: 10px;
}
#footright a {
     color: #024886;
     width: auto;
     float:right;
     padding: 10px;
     text-decoration: none;
}
 
#logo {
      display: block;
	height: 135px;
	width: 265px;
}
#icons {
      position: relative;
      display: block;
	background: url(../images/icon_bar_06.gif) repeat-x;
	height: 37px;
	width: 440px;
      float: right;
     
}
#splash {
      text-align: center;
      margin: 5px;
}
 
.tile {
	float: left;
	width: 106px;
      height: 225px;
      margin: 5px;
}
 
input.submit {text-transform:uppercase; font-family:Tahoma, Arial, Helvetica, Geneva, sans-serif; font-size:10px; background-color:#336699; color:#ffffff; font-weight:bold; border: 2px solid; border-color:#003333;}
 
input.submit:hover {text-transform:uppercase; font-family:Tahoma, Arial, Helvetica, Geneva, sans-serif; font-size:10px; background-color:#488AA0; color:#ffffff; font-weight:bold; border: 2px solid; border-color:#333333;}
 
.flat {font-size: 11px; color: #336699; border: #336699 1px solid; font-family:Tahoma, Arial, Helvetica, Geneva, sans-serif; background: #ffffff; padding-left: 5px;}
 
#baby_frame {
      position:relative;
      width: 500px;
      height: 600px;
      z-index: 10;
      border: 2px solid black;
      left: 120px;
}
#baby_frame .imageFrame {
      position:absolute;
      width: 100%;
      height: 100%;
      top: 0;
      left: 0;
      z-index: 30;
}
#baby_pic {
      position:absolute;
      top: 120px;
      left: 50px;
      z-index: 10;
}
#baby_name {
      position: absolute;
      top: 30px;
      left: 20px;
      width: 350px;
      z-index: 50;
}
.bdetail th {
    font-size: 12px;
    color: #000;
    text-align: right;
    font-weight: bold;
} 
.babydetails {
      position: absolute;
      top: 410px;
      left: 195px;
      width: 255px;
      z-index: 60;
}
h3.baby {
      color: #000;
      font-size: 37px;
      font-weight: bold;
      margin-top: 1px;
      padding-left: 20px;
}
h4.baby {
    color: #000;
    font-size: 17px;
    margin-top: 5px;
    margin-bottom: 1px;
    font-style: italic;
}
img.dogear {
    position: relative;
    top: -13px;
    right: -13px;
    float: right;
}
 
table.baby {width:100%; border-collapse: collapse; border-spacing:0; border-color: #000000; border-width: 1px; border-style: solid;}
table.baby th {white-space: nowrap; text-transform: uppercase; text-align: center; background:#336699; padding:4px; font-size: 9px; font-weight: bold; color: #ffffff; border-color: #2F8A53; border-width: 1px; border-style: solid; padding: 4px;}
table.baby td {font-size: 90%; font-weight: normal; color: #000000; border-color: #2F8A53; border-width: 1px; border-style: solid; padding: 4px; }
 
div.contentbox {
    float: left;
    background: #F7F7F7;
    border: 1px dotted #ccc;
    padding: 12px;
    width: 712px;
    margin-top: 20px;
}
 
/* #############  CONTENT - SECTIONS & CATEGORIES ###########################*/
/* Element |ID   | Class 			  |Suffix */
/* Div     |NA   |contentheading   |pageclass_sfx*/
/* com_content AKA CORE ARTICLES FOR JOOMLA */
/* I */
 
/*  Needs Edit component heading */
/* Element |ID   | Class 			  |Suffix */
/* Div     |NA   |contentheading   |YES */
/* Top of any article is Parameters - Component : Show Article Title*/
.componentheading {
   font-size: 20px;
   color: #336699;
}
	
/* Element |ID   | Class 			  |Suffix */
/* Div     |NA   |contentheading   |YES */
/* Top of any article is Parameters - Component : Show Article Title*/
.contentheading {
      float: left;
      width: 670px;
}
 
.simplelist {
	float: left;
      width: 750px;
      padding-bottom: 20px;
}
/* article rating needs to turn on via the back-end */
.content_rating {}
.content_vote {}
/* .button class to be added see forms css */
 
 
/* Element |ID   | Class 			    |Suffix */
/* Div     |NA   |contentpagetitle   |YES */
/* Top of any article is Parameters - Component : Show Article Title*/
/* content title and links href links happens if turned on via the back-end*/
.contentpagetitle{}
a.contentpagetitle:link{}
a.contentpagetitle:visited {}
a.contentpagetitle:hover{}
 
/* top box like a category description */
.contentdescription {}
 
/* Icons Print E-mail PDF etc.*/
.buttonheading{
	float: left;
	width: 60px;
}
 
/* Writen by Authors name can also be seen on search com results href and intro text & Category listing if it has a article count*/
.small {}
 
/* Dates */
.createdate {}
.modifydate {}
.newsfeeddate {}
/* Dates */
 
 
/* Main Body Text */
.contentpane {}
/* Main Body Text */
.contentpaneopen {}
/* edit button if you have access to it */
.contentpaneopen_edit{}
 
 
/* Article Table of contents */
table.contenttoc {float:right;}
	
/* Heading Top TOC */
table.contenttoc th {}
 
/* Table Data can add color */
table.contenttoc td {}
 
/* Links Article Table of contents index */
a.toclink:link,	a.toclink:hover, a.toclink:visited  {}
/* End Article Table of contents  */
 
/* Main Body Text */
 
/* << Prev - Next >> */
.pagenavbar{}
.pagenavcounter{}
 
/* Page footer nav  « StartPrev12NextEnd » */
.pagination{}
.pagination span {}
a.pagination  a   {} 
a.pagination:hover {}
 
/* Table layout types "list"ings  Archived, weblink etc..*/
.sectiontableheader {}
	
/* Table odd and Even Rows */
.sectiontableentry1 {}
.sectiontableentry2 {}
.sectiontablefooter {}
/* End Sectiontable */
 
/* Category */
.category {}
a.category:link, a.category:visited, a.category:hover  {}
/* End category */
 
 
/* blogs Layout Style Top of the page Blog style Layouts */
.blog {}
.blog_heading {}
/*  At the footer of the blog style pages */
.blog_more{}
/* UL List at the footer of the Page */
.blogsection{}
 
/* Read more link to full article  */
.readon{}
 
/* space from bottom of article */
.article_separator{}
  
/* new and Added  */
 /* This is table's TD tag that goes around the hole frontpage and blog com's 
 the backround would cover both td's or all colums
 */
.article_column{}
 
/* this class add formating to the right side of the content front page. 
it will overwrite the hole right and take formating over article_column after the first col
*/
.column_separator{}
/* End blogsection */
 
 
/* Need to Edit this is not My code See plugins images */
/* thumbnails */
div.mosimage         {}
div.mosimage_caption {}
 
div.caption       {}
div.caption img   {}
div.caption p     {}
/* Need to Edit this is not My code See plugins images */
 
/* New added */
/* com_archive */
/* 
li      |row                  | 1
h4      |title                |
h5		  |metadata					|
span    |created-date         |
span    |author               |
div     |intro                | */
 
/* It's LI in a UL list  */
 .row1{}
 /* H4 Header tag for Title */
 .title{}
 
 
 /* Plugin content Items Archived Article List */
 /* It a h5 HTML tag which wraps around the authors name meta etc.. */
 /* needs div id forul list type layout */
.author{}
.metadata{}
.intro{}
.MsoNormal{}
 
/*Com Polls*/
/* Has Styles inside its own com folder */
/*td      |smalldark          	| */
.smalldark  {}
 
/*com_search*/
.searchintro{}
/*Search Form keyword highlight*/
.highlight {}
 
/* ############# END CONTENT - SECTIONS & CATEGORIES ###########################*/

Open in new window

0
Donnie Walker
Asked:
Donnie Walker
  • 3
  • 2
1 Solution
 
Tomarse111Commented:
Changing contentheading to 100% drops the text down to the correct position:

.contentheading {
      float: left;
      width: 100%;
}

but then your buttonheading is moved lower. This i think is one of the crux's of the problem.
0
 
Donnie WalkerAuthor Commented:
also, I forgot to mention that this works fine in IE.

I am having this issue with Firefox.
0
 
myderrickCommented:
I think the issue is your html not the css. the <p> inside the #page is causing trouble....

I am checking it out.

MD
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
myderrickCommented:
I just got it:

The h2 and the <p> are on the same line....so put a break there. This is a hack but it works.

add <br/> after the h2.

Also validate your codes...there are some errors.

MD
<h2 class="contentheading">
	CEO Message</h2>
 
<br/>
<p..........

Open in new window

0
 
Donnie WalkerAuthor Commented:
that fixes it in Firefox but screws it up in IE.
0
 
Donnie WalkerAuthor Commented:
ok, I've solved the problem to my satisfaction.

I did this:

h2.contentheading { */ no values)
}

p.buttonheading {
  text-align: right;
}
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now