Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2008
    Posts
    47

    div css problem, please see it. Thanks.

    Hi, everybody

    I am going with difficulty, please see the image.

    Title list, the program statement is the following:



    <li><span class="box_r"><a href="{S_URL}/space.php?uid=$value[uid]" target="_blank">$value[username]</a></span><a href="$value[url]" title="$value[subjectall]" target="_blank">$value[subject]</a></li>




    css:

    .global_tx_list { overflow:hidden; padding:0 15px; }
    .global_tx_list li {padding-left:12px; background:transparent url(../images/icon_li.gif) no-repeat scroll 0 11px; height:50px;line-height:25px;}
    .global_tx_list .box_r {float:right; padding-left:6px; color:#029922;}
    .global_tx_list .box_r a { color:#029922; }





    One article list has two word-lines becasue of the length, and the author name is supposed to be at the end of the title (like the "admin" position inside the blue circle).

    but I can't deal with it properly, now the name is at the end of the first line(red circle position), rather than the end of the title.

    Please see it, can you give me a hand?

    Thank you!
    Attached Thumbnails Attached Thumbnails 123.jpg  

  2. #2
    Join Date
    Feb 2005
    Location
    Washington DC USA
    Posts
    179

    Here's a stab at your problem

    Quote Originally Posted by kuer View Post
    Hi, everybody

    css:

    .global_tx_list { overflow:hidden; padding:0 15px; }
    .global_tx_list li {padding-left:12px; background:transparent url(../images/icon_li.gif) no-repeat scroll 0 11px; height:50px;line-height:25px;}
    .global_tx_list .box_r {float:right; padding-left:6px; color:#029922;}
    .global_tx_list .box_r a { color:#029922; }
    Off the top of my head I think the browser doesn't know the size of the in-line list. As a test, try adding "border:1px solid #f00;" to your original ".global_tx_list" CSS. If I am correct, the border will be drawn as a line at the top of the text -- it will have no height.

    To give the browser a better idea of the size of your text, try something like this (I'm sure I messed your formatting up):

    .global_tx_list {
    display: table;
    overflow: hidden; /* I'm not sure if you can keep this statement */
    padding: 0 15px;
    white-space: nowrap;
    list-style-type:none;
    }

    * html .global_tx_list { /* Undo *nix misstatements for IE */
    display:inline-block;
    width: 1px;
    padding: 0 15px 0;
    }

    .global_tx_list li { /* *nix version */
    display:table-cell;
    padding-left:12px;
    background:transparent url(../images/icon_li.gif) no-repeat scroll 0 11px;
    height:50px;line-height:25px;
    }

    * html .global_tx_list li { /* Correct for IE */
    display:inline;
    }

    .global_tx_list .box_r {
    float:right;
    padding-left:6px;
    color:#029922;
    }

    .global_tx_list .box_r a { /* *nix and generally accepted version */
    display:block;
    color:#029922;
    }


    * html .global_tx_list .box_r a { /* Undo *nix misstatements for IE */
    display:inline-block;
    margin: 0 -2px;
    }

    I'm not real sure about how the ".box_r" stuff will format. The key is to get the in-line list working first -- then you can figure out the <a> tags.

    Also you might want to consider restating the background (or just "background: transparent") whenever you state the text color in your CSS. I seem to recall that W3C is getting fussy about pairing those two parameters.

    I hope this is useful,

    Aza D. Oberman

  3. #3
    Join Date
    Mar 2008
    Posts
    47
    thanks, I am trying.

    I went on business. sorry for reply so late

  4. #4
    Join Date
    Oct 2002
    Location
    State of Disbelief
    Posts
    22,951
    Thread cleaned of unrelated discussion, please try to stay on topic.
    Having problems, or maybe questions about WHT? Head over to the help desk!

Similar Threads

  1. [problem] Invalid URI in request (httpd problem)
    By xserverx in forum Hosting Security and Technology
    Replies: 0
    Last Post: 05-14-2008, 11:17 AM
  2. Domain Problem , Hosting Problem or Security Problem?
    By xoleno in forum Hosting Security and Technology
    Replies: 0
    Last Post: 03-31-2008, 05:41 AM
  3. Software Problem on Dedicated Server...Not a Problem on Shared??
    By ekusteve in forum Hosting Security and Technology
    Replies: 4
    Last Post: 06-14-2005, 12:35 PM
  4. php problem? Apache problem? Mime? Script can't do upload....
    By galacnet in forum Hosting Security and Technology
    Replies: 7
    Last Post: 05-30-2005, 11:15 AM
  5. Large problem with domains displaying wrong problem.
    By NationHosts in forum Hosting Security and Technology
    Replies: 3
    Last Post: 01-20-2004, 08:05 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
  •