SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    Non-Member
    Join Date
    Apr 2007
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Change the font size/color in a directory

    I'm using an upload script that provides a directory of the files that are uploaded. I'd like to change the size & color of the font that appears on the page in the directory/matrix. I think I've provide the correct part of the code.
    Can you tell me how/where I can change the file name size/color and the date size/color ?

    Thanks.


    Code:
    <tr>
    				<td style=\"background: #fff; color: #000; text-align: left; width: 70%\"><a href=\"$upload_directory$file\" title=\"$file (".filesize($upload_directory."".$file)." bytes)\">".$file."</a> (".filesize($upload_directory."".$file)." bytes)</td>";
    	if($allow_file_deletion)
    	$uploaded_files .= "
    				<td style=\"background: #fff; color: #000; text-align: right; width: 30%\"><a href=\"?delete=$upload_directory".urlencode($file)."\" title=\"Delete File\">Delete File</a></td>";
    	else
    	$uploaded_files .= "
    				<td style=\"background: #fff; color: #000; text-align: right; width: 30%\"><del>Delete File</del></td>";
    	$uploaded_files .= "
    			</tr>
    			<tr>
    				<td colspan=\"2\" style=\"background: #eee; color: #000; text-align: left; text-indent: 20px\"> Uploaded".date("F d, Y / h:ia", filemtime($upload_directory.$file))."</td>";
    	$uploaded_files .="
    			</tr>

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
                    <td style=\"background: #fff; color: #000; text-align: left; width: 70%\"><a href=\"$upload_directory$file\" title=\"$file (".filesize($upload_directory."".$file)." bytes)\">".$file."</a> (".filesize($upload_directory."".$file)." bytes)</td>"
    It appears this line contains your style for the filename :
    HTML Code:
    style=\"background: #fff; color: #000; text-align: left; width: 70%\"
    PHP Code:
    <td colspan=\"2\" style=\"background: #eee; color: #000; text-align: left; text-indent: 20px\"> Uploaded".date("F d, Y / h:ia"filemtime($upload_directory.$file))."</td>"
    And this line contains your style for Upload Date :
    HTML Code:
    style=\"background: #eee; color: #000; text-align: left; text-indent: 20px\"
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.

  3. #3
    rajug.replace('Raju Gautam'); bronze trophy Raju Gautam's Avatar
    Join Date
    Oct 2006
    Location
    Kathmandu, Nepal
    Posts
    4,013
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And of course add in the line

    style=\"background: #fff; color: #000; text-align: left; width: 70&#37;\"
    something like
    font-size:12px;color:#FF0000;
    or whatever you need.
    Mistakes are proof that you are trying.....
    ------------------------------------------------------------------------
    PSD to HTML - SlicingArt.com | Personal Blog | ZCE - PHP 5

  4. #4
    Non-Member
    Join Date
    Apr 2007
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thank you

    Thanks for your replies, however, I don't seem to be able to change the File Name color or the "Delete File" text color. How would I do that?

    From the lines discussed here, I've been able to change the file size text color, the word Uploaded color and the date color.

    Do you need more code to be posted?

    thanks

  5. #5
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is your line which contains your style for the "Delete File" :
    PHP Code:
    <td style=\"background: #fff; color: #000; text-align: right; width: 30%\"><a href=\"?delete=$upload_directory".urlencode($file)."\" title=\"Delete File\">Delete File</a></td>"
    This portion deals with style:
    HTML Code:
    style=\"background: #fff; color: #000; text-align: right; width: 30%\"
    As per Rajug's post add in :
    HTML Code:
    font-size:12px; color:#FF0000;
    This is your line which contains your style for the "File Name" :
    PHP Code:
    <td style="background: #fff; color: #000; text-align: left; width: 70%\"><a href=\"$upload_directory$file\" title=\"$file (".filesize($upload_directory."".$file)." bytes)\">".$file."</a> (".filesize($upload_directory."".$file)." bytes)</td>"
    This portion deals with style:
    HTML Code:
    style="background: #fff; color: #000; text-align: left; width: 70%\"
    As per Rajug's post add in :
    HTML Code:
    font-size:12px; color:#FF0000;
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.

  6. #6
    Non-Member
    Join Date
    Apr 2007
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    thanks, but...

    Thanks again for your reply.

    I have added font-size:12px;color:#990000 as you can see from the line below, as instructed, but it doesn't change the file-name color. It changes the file-size text color. I'm probably doing something incorrect, so any additional help would be greatly appreciated.

    <td style=\" background: #fff; color=#000;font-size:12px;color:#990000;text-align: left; width: 70%\">

    also tried:

    <td style=\" background: #fff; font-size:12px;color:#990000;text-align: left; width: 70%\">

  7. #7
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The first <td> cell contains the filename correct ?
    Try using "color:#900"
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.

  8. #8
    Non-Member
    Join Date
    Apr 2007
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Hi

    Hi,

    thanks for your reply.

    I tried #900, it didn't change anything.

    I don't know if "The first <td> cell contains the filename ". That's why i posted the code, I don't know where to change the file name color.

    Should I post mpore page code?

  9. #9
    SitePoint Evangelist
    Join Date
    Aug 2005
    Posts
    453
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When you view this in the browser is the file name the first thing in the row?
    Computers and Fire ...
    In the hands of the inexperienced or uneducated,
    the results can be disastrous.
    While the professional can tame, master even conquer.

  10. #10
    Non-Member
    Join Date
    Apr 2007
    Posts
    224
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    yes

    Yes, when I view this in the browser is the file name the first thing in the row


Bookmarks

Posting Permissions

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