Register

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.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15
  1. #1
    Senior Member Seldimi's Avatar
    Join Date
    Dec 2002
    Location
    Kozani, Greece
    Posts
    488
    Member #
    409
    Hello. I have a problem with my CSS and .php Page.
    I have on the page
    PHP Code:
    print "<td width='180' class='tbl_cell_left'><b>Name</b></td>"
    and at .css file which is called
    Code:
    .tbl_cell_left {
    	border-right-style: none;
    	border-right-width: medium;
    	border-top-style: none;
    	border-top-width: medium;
    	border-bottom-style: none;
    	border-bottom-width: medium
    }
    it doesn't work thought I don't know why.

    Before chaning to this, I had
    PHP Code:
    print "<td width='180' style='border-right-style: none;border-right-width: medium;
    border-top-style: none;border-top-width: medium;border-bottom-style: none;
    border-bottom-width: medium'><b>Name</b></td>"

    and worked perfectly
    - Webmaster's Planet . Greek Vortal For Webmasters ...
    - MyPortFolio - View My Creations

  2.  

  3. #2
    Senior Member Maverick's Avatar
    Join Date
    Sep 2003
    Location
    Hoboken, NJ
    Posts
    351
    Member #
    3253
    all values inside of the td tag should be enclosed in " (double quotes), not ' (single quotes) like you have. Fix that and it should work.

    so it would look like this:
    PHP Code:
    print "<td width=\"180\" class=\"tbl_cell_left\"><b>Name</b></td>"
    EDIT: oops, my bad
    www.stevenspoker.com
    "You can't lose what you don't put in the middle, ... but you can't win much either." -Mike McDermott (Rounders)

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    They need to be escaped as per my edit.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Member
    Join Date
    Jan 2004
    Posts
    94
    Member #
    4729
    just a note, if you dont have any variables on what you are

    print/echoing then you could use single quotes.

    print '<td width="180" class="tbl_cell_left"><b>Name</b></td>';

    it also makes it marginly faster (as in your never going to notice the difference faster -- couple of ms faster?)

  6. #5
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Unlikely a single millisecond would change. I always use double-quotes (except for array keys) for consistency.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  7. #6
    Senior Member Seldimi's Avatar
    Join Date
    Dec 2002
    Location
    Kozani, Greece
    Posts
    488
    Member #
    409
    Well I use this format
    PHP Code:
     print " <table border='1' width='500'> 
    and works perfectly, only the class doesn't work. I will give it a try though.
    - Webmaster's Planet . Greek Vortal For Webmasters ...
    - MyPortFolio - View My Creations

  8. #7
    Senior Member Seldimi's Avatar
    Join Date
    Dec 2002
    Location
    Kozani, Greece
    Posts
    488
    Member #
    409
    No results
    - Webmaster's Planet . Greek Vortal For Webmasters ...
    - MyPortFolio - View My Creations

  9. #8
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    That CSS isn't going to display any borders though.

    Am I missing something or do you want right, top and bottom borders to be medium width? If you do then this will do it:

    Code:
    .tbl_cell_left 
            {
    	border-right-style: solid;
    	border-right-width: medium;
    	border-top-style: solid;
    	border-top-width: medium;
    	border-bottom-style: solid;
    	border-bottom-width: medium;
    	border-color: black;
    	}

  10. #9
    Senior Member Seldimi's Avatar
    Join Date
    Dec 2002
    Location
    Kozani, Greece
    Posts
    488
    Member #
    409
    No, the Css code is correct (I just copied it from the style="blabla" and put it to .css file)
    - Webmaster's Planet . Greek Vortal For Webmasters ...
    - MyPortFolio - View My Creations

  11. #10
    Senior Member mossoi's Avatar
    Join Date
    Apr 2003
    Location
    Englandshire, United Kingdomsville y'all!
    Posts
    1,111
    Member #
    1206
    Liked
    1 times
    So what is the CSS supposed to be doing? What is the desired effect of implementing the CSS?


Page 1 of 2 1 2 LastLast

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 04:27 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com