Jump to content

Recommended Posts

I have the following mark-up bellow.  Using CSS I want the "Phone" information to display next to the "Address"
[code]
<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>[/code]

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

[code]
#detail_contact_address {
float: left;
}
[/code]

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

I also tried

[code]
#detail_contact_address {
position: absolute;
top: 0; left: 50%;
}
[/code]

and

[code]
#detail_contact_address {
display: inline;
}
[/code]

I'm scratchin my head here!  Any body know what's up?
Link to comment
https://forums.phpfreaks.com/topic/20607-css-positioning/
Share on other sites

<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;
}
Link to comment
https://forums.phpfreaks.com/topic/20607-css-positioning/#findComment-90993
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.