+ Reply to Thread
Results 1 to 8 of 8

Thread: CSS Formatting issue

  1. #1
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    CSS Formatting issue

    I am working on a css design but I am having issues with the following design


    CSS
    Code:
    #enclosure {
        height: 150px;
        width: 668px;
        overflow: auto;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: 12px;
        border: 1px solid #566F8E;
    }
    HTML
    Code:
    <div id="enclosure">
    
    <table width=100%>
    Bunch of rows
    </table>
    
    </div>
    The content in the table is generated in a php script so i can not live without the table.

    The issue is this code needs to work in all browsers and currently only works in FF. In FF the table adjusts to the width of having a scrollbar but in IE it does not and a horizontal scrollbar appears. Is there a hack or somthing i can use to prevent this.

  2. #2
    Join Date
    Aug 2007
    Location
    Gangstas Paradise
    Posts
    4,143

    Re: CSS Formatting issue

    If its a hack you looking for then do this
    HTML Code:
    #enclosure {
     ...
    	overflow-x:hidden;
    	overflow-y:scroll;
     ...
    }

    http://dev.x10hosting.com (this has nothing to do with x10hosting)

    ->All us helpful people here at x10hosting would like to reach our next user groups, "Community Paragon". Please click the +rep icon on the left hand side of a post if that post was helpfull.



  3. #3
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: CSS Formatting issue

    That is only going to work to get rid of the horizontal scroll bar what about the content aligned right in the table that is cut off by the vertical scrollbar. If I add in a 18 px margin it looks bad.

  4. #4
    Join Date
    Aug 2007
    Location
    Gangstas Paradise
    Posts
    4,143

    Re: CSS Formatting issue

    hmm... funny, works for me in FF 3.0.14, IE 7.0.6001, GC 3.0.195.27, Opera 9.64. The vertical scroll bar doesn't cut off anything.

    http://dev.x10hosting.com (this has nothing to do with x10hosting)

    ->All us helpful people here at x10hosting would like to reach our next user groups, "Community Paragon". Please click the +rep icon on the left hand side of a post if that post was helpfull.



  5. #5
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: CSS Formatting issue

    It works in the older versions of IE but not in IE8


    I guess IE8 screwed up all kinds of functions. I have to completely redo some of my php because if the <td></td> is blank the css will not create the border it simply leaves it out. I have to enter & &nbsp; into every blank field. Which sadly means a foreach statement to check for any blank database entries.


    I HATE M$ Coders
    Last edited by driveflexfuel; 10-19-2009 at 03:30 PM.

  6. #6
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: CSS Formatting issue

    You can use the empty-cells CSS property to put a border around empty cells. <= IE 7 don't support it, but it sounds like that isn't an issue.

    What doctype are you using?

    A hackish way of doing it is to set a right padding that's the width of the scrollbar along with the overflow-x property:
    Code:
    <!--[if lte IE 7]>
    <style type="text/css">
    .enclosure {
      overflow-x: hidden;
      padding-right: 16px;
    }
    </style>
    <![endif]-->
    Last edited by misson; 10-19-2009 at 05:41 PM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  7. #7
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: CSS Formatting issue

    Quote Originally Posted by misson View Post
    You can use the empty-cells CSS property to put a border around empty cells. <= IE 7 don't support it, but it sounds like that isn't an issue.

    What doctype are you using?

    A hackish way of doing it is to set a right padding that's the width of the scrollbar along with the overflow-x property:
    Code:
    <!--[if lte IE 7]>
    <style type="text/css">
    .enclosure {
      overflow-x: hidden;
      padding-right: 16px;
    }
    </style>
    <![endif]-->
    I am using a .php file. I knew about the fix you listed above but if i use it in FF or any other browser i get a 16 pixel padding on the right also with IE8 it is 18px to be exact lol.

    The content that loads into the div has alternating row colors so it does not look right unless it reaches the right. On the far right of the table there are several buttons for adjusting the database entries. I am thinking of using an I frame to load the content. I have always hated iframes but it is an easy solution to my problem.

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: CSS Formatting issue

    Did you notice the conditional comments to target <= IE 7? No mussing up presentation in FF, Safari, Chrome, Opera or what-have-you.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

+ Reply to Thread

Similar Threads

  1. integration issue between support, cpanel, forum ????
    By holeepassion in forum Free Hosting
    Replies: 4
    Last Post: 12-14-2008, 09:50 PM
  2. Absolut server and subdomain issue
    By holeepassion in forum Free Hosting
    Replies: 5
    Last Post: 05-13-2008, 08:54 AM
  3. possible dns issue getting to the cpanel on stoli
    By eagles051387 in forum Free Hosting
    Replies: 4
    Last Post: 03-07-2008, 02:09 AM
  4. DNS Issue
    By Corey in forum Service Alerts
    Replies: 10
    Last Post: 05-14-2006, 02:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers