Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    display:inline not working

    I need to keep my div at the same line as my select. This div should appear only when the user selects a certain value of the select; in all the others it should dissapear. This is working, but the img is appearing down the select, but I want it at the same line. I am using display:inline for that but it's not working. How can I fix it?

    My code:

    .inline-css {display:inline}
    .inv {display:none}


    <tr><td>Tipo de Endereço:
    <td><select name="tipo_end" id="tipo_end"></select>
    <div id='div_copy' class='inv'><img title="Copiar o endereço residencial do cônjuge" id="copiaEndConj" width=25 class='img' src="copypaste2.png"></div>

  • #2
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    I don't see where you are applying the class inline-css, but it does not really matter. You are making a serious mistake trying to do layout using a table. Tables have different rules for rendering and tend to format dynamically. a change in any cell anywhere in a table structure, can cause a modification of any other cel in the scructure. tables are for rendering tabular data and using them for anything else is guaranteed to create issues, limitations, and maintenance headaches.

    I you post a link to the page we might be able to suggest ways of getting the rendering you want.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #3
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by COBOLdinosaur View Post
    I don't see where you are applying the class inline-css, but it does not really matter. You are making a serious mistake trying to do layout using a table. Tables have different rules for rendering and tend to format dynamically. a change in any cell anywhere in a table structure, can cause a modification of any other cel in the scructure. tables are for rendering tabular data and using them for anything else is guaranteed to create issues, limitations, and maintenance headaches.

    I you post a link to the page we might be able to suggest ways of getting the rendering you want.

    I am changing the class on javascript, when the user change the value of select. I will try to change my code and stop using table, but in my case I know it's important to use a table. You would understand if you saw.

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,662
    Thanks
    6
    Thanked 1,006 Times in 979 Posts
    Quote Originally Posted by ludhiana View Post
    You would understand if you saw.
    Then show us, please. I would also like to understand.

  • Users who have thanked VIPStephan for this post:

    COBOLdinosaur (04-10-2014)

  • #5
    New to the CF scene
    Join Date
    Apr 2014
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by VIPStephan View Post
    Then show us, please. I would also like to understand.
    This is a code from my job, I'm not allowed to show it to anyone.
    But someone from a brazilian forum helped me, and didn't question my code.
    Thanks, anyway.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •