Jump to content


Photo

CSS positioning


  • Please log in to reply
1 reply to this topic

#1 dustinnoe

dustinnoe
  • Members
  • PipPipPip
  • Advanced Member
  • 187 posts
  • LocationWarner Robins, GA

Posted 13 September 2006 - 12:23 PM

I have the following mark-up bellow.  Using CSS I want the "Phone" information to display next to the "Address"
<div id='detail_contact'>
	<div>
		<h3>Contact Information</h3>
	</div>
	<div>
		<div id='detail_contact_address'>
			<h4>Address</h4>
			Address Line 1<br />
                        City, State Zip
		</div>
		<div id='detail_contact_phone'>
			<h4>Phone #</h4>
			555-555-5555
		</div>
	</div>
</div>

I have tried the following CSS and can't understand why it will not work.

#detail_contact_address {
	float: left;
}

If I am thinking correctly that should work, but it doesn't in FF or IE

I also tried

#detail_contact_address {
	position: absolute;
	top: 0; left: 50%;
}

and

#detail_contact_address {
	display: inline;
}

I'm scratchin my head here!  Any body know what's up?

#2 ToonMariner

ToonMariner
  • Members
  • PipPipPip
  • Advanced Member
  • 3,342 posts
  • LocationNewcastle upon Tyne, UK

Posted 13 September 2006 - 12:55 PM

<div id='detail_contact'>
<h3>Contact Information</h3>

<div>
<div id='detail_contact_address'>
<h4>Address</h4>
Address Line 1<br />
                        City, State Zip
</div>
<div id='detail_contact_phone'>
<h4>Phone #</h4>
555-555-5555
</div>
</div>
</div>


h3 {
clear: both;
}

#detail_contact_address,
#detail_contact_address {
{
float: left;
width: 250px;
}
follow me on twitter @PHPsycho




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users