If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member
    Join Date
    May 2003
    Member #
    I use php to create the XHTML, using echo.

    I have a outer div, with class set to infosearchbar
    Inside that div I have two divs, each with an inline style, the inlines are to state how much width of the outer div they both get.

    However, the first div does not inherit the outer divs stylings, but the second one does.

    Here is the html produced.

    HTML Code:
    <div class="infosearchbar"><div style="width: 70%; display: inline; float: left">test Web</div><div style="width: 30%; display: inline;">Search gf returned 0, and took  seconds.<br /></div></div>
    The css for .infosearchbar is below

    .infosearchbar {
    background: #99ccff;
    color: black;
    width: 100%;
    display: inline;
    margin-left: auto;
    margin-right: auto;
    padding-left: 10px;
    font-size: 14px;
    Any ideas?


  3. #2
    Senior Member Stylise's Avatar
    Join Date
    Jul 2005
    Mount Martha, Australia
    Member #
    Giv the outer div a height, then it should work. Because you have a float, it isn't relative to the previous div.

  4. #3
    Senior Member Rince's Avatar
    Join Date
    Nov 2004
    Member #
    It's the float that is the differance. So there is you culprit. You have both float and display inline. Decide on one or the other. You don't need both.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 08:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: