www.webdeveloper.com
Results 1 to 4 of 4

Thread: [RESOLVED] change font color, in Div table

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    36

    resolved [RESOLVED] change font color, in Div table

    Need help, I'm still learning but, just need some assistance, I have the following layout designed for my website that I am helping someone with, the table that is on the left I would like to change the font color to red, and the first row to background color of red, however I am at a complete loss in where i would actually paste the code at. can someone please take a look at this and help me please.
    Code:
    <html>
    <title>Kink Live Model Directory</title>
    <body>
    <body bgcolor="#000000">
    <center><img src="http://content.kink.com/mmr/2012/01/31/KL_Header_final_165119.jpg"></center>
    <br>
    <font color="#ffffff">
    <center>
    So I decided to do something pretty neat, I wanted to build a data base of all the models past and present that currently all have fan pages and or clubs. 
    I have linked the picture to its respected fan page or club, So just simply click on the models picture and bam you are right at there fan page. I hope everyone 
    like the lay out, would love to hear everyone's feedback,  I know right off a lot of you may be like well what happens if there is more then one link to a models pages, 
    well what I did was is every model that has had more then one I took the one that is most active and been last updated on. not to say that other fan pages are not equally as 
    important. So I hope everyone enjoys it.
    </font>
    </center>
    <br>
    <div style="width:500px;">
    
    
        <div style="float:left; width:250px">       
            <table border="1px">    
            <tbody >        
                  <tr>
    <th>Kink Compilations</th>
    </tr>
    <tr>
    <td>KinkLive.com</td>
    </tr>
    <tr>
    <td>Kink.com Test Shoots</td>
    </tr>
    <tr>
    <td>BoundGangBangs.com</td>
    </tr>
    <tr>
    <td>DeviceBondage.com</td>
    </tr>
    <tr>
    <td>Divine*****es.com</td>
    </tr>
    <tr>
    <td>ElectroSluts.com</td>
    </tr>
    <tr>
    <td>EverythingButt.com</td>
    </tr>
    <tr>
    <td>****ingMachines.com</td>
    </tr>
    <tr>
    <td>Hogtied.com</td>
    </tr>
    <tr>
    <td>Kink Features</td>
    </tr>
    <tr>
    <td>Kink University</td>
    </tr>
    <tr>
    <td>MenInPain.com</td>
    </tr>
    <tr>
    <td>MyFirstTimeBound.com</td>
    </tr>
    <tr>
    <td>PublicDisgrace.com</td>
    </tr>
    <tr>
    <td>Real****ingCouples.com</td>
    </tr>
    <tr>
    <td>SexAndSubmission.com</td>
    </tr>
    <tr>
    <td>TheTrainingofO.com</td>
    </tr>
    <tr>
    <td>TheUpperFloor.com</td>
    </tr>
    <tr>
    <td>TSPussyHunters.com</td>
    </tr>
    <tr>
    <td>TSSeduction.com</td>
    </tr>
    <tr>
    <td>UltimateSurrender.com</td>
    </tr>
    <tr>
    <td>WaterBondage.com</td>
    </tr>
    <tr>
    <td>WhippedAss.com</td>
    </tr>
    <tr>
    <td>WiredPussy.com</td>
    </tr>
    <tr>
    <td>Kink Raw Test Shoots</td>
    </tr>
    <tr>
    <td>Mean Couple</td>
    </tr>
    <tr>
    <td>Pissing.com</td>
    </tr>                          
            </tbody>
            </table>
        </div>
    </html>

  2. #2
    Join Date
    Jun 2009
    Location
    Chi town. IL68 ICAO code home airport, literally.
    Posts
    153
    For starters clean up your HTML its a mess, dont do inline comments. Link out your CSS like so....

    Stick this above your header
    HTML Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    This goes in the header.
    HTML Code:
    <link rel="stylesheet" type="text/css" href="index.css" />
    now as to change your font color to red in your css add this...
    HTML Code:
    color: #ffffff
    You can either put that in a DIV tag or a class tag of your choice.

    As to your first row, what do you mean by,
    and the first row to background color of red
    ?
    For want of a nail...the horseshoe was lost. For want of a horseshoe, the steed was lost. For want of a steed...the message was not delivered. For want of an undelivered message.....the war was lost.

  3. #3
    Join Date
    Oct 2012
    Posts
    36
    Thank you for your response, I do not know what you mean by link out my css with that following code, but however so I was
    able to change the color of the font that i wanted to change, now however I am trying to link the items and I am having difficulty on changing the colors on the right combination. below is what I think you told me to put things and did i do the link code
    correctly and is it in the right placement

    Code:
    {
    a:link { color: red; }
    a:visited { color: red; } 
    a:hover { color: blue; } 
    {
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <link rel="stylesheet" type="text/css" href="index.css" />
    <style>
    {
    a:link { color: red; }
    a:visited { color: red; } 
    a:hover { color: blue; } 
    {
    }
    table { 
      border: 0; 
      font-family: comic sans ms; 
      font-size:14px; 
    } 
    td 
    {
    background-color:black;
    color:red; 
    }
    </style>
    
    <div style="width:500px;">
    
    
        <div style="float:left; width:250px">       
            <table border="1px">    
            <tbody >        
                  <tr>
    <td><a href="http://www.kinkondemand.com/kod/shoots.jsp?site=KINKCOMPILATIONS" target="_blank">Kink Compliations</td>
    </tr>
    <tr>
    <td><a href="http://www.kinklive.com" target="_blank">KinkLive.com</td>
    </tr>
    <tr>
    <td><a href="http://www.kinkondemand.com/kod/shoots.jsp?site=KINKTESTSHOOTS" target="_blank">Kink.com Test Shoots</a><img src="http://www.kinkondemand.com/static/img/kod/KOD_new.png" /></td>
    </tr>
    <tr>'"
    <td><a href="http://www.kinkondemand.com/kod/shoots.jsp?site=BOUNDGANGBANGS" target="_blank">BoundGangBangs.com</td>
    </tr>
    <tr>
    <td><a href="http://www.kinkondemand.com/kod/shoots.jsp?site=DEVICEBONDAGE" target="_blank">DeviceBondage.com</td>
    </tr>
    <tr>
    <td><a href="http://www.kinkondemand.com/kod/shoots.jsp?site=DIVINE*****ES" taret="_blank">Divine*****es.com</td>
    </tr>
    <tr>
    <td>ElectroSluts.com</td>
    </tr>
    <tr>
    <td>EverythingButt.com</td>
    </tr>
    <tr>
    <td>****ingMachines.com</td>
    </tr>
    <tr>
    <td>Hogtied.com</td>
    </tr>
    <tr>
    <td>Kink Features</td>
    </tr>
    <tr>
    <td>Kink University</td>
    </tr>
    <tr>
    <td>MenInPain.com</td>
    </tr>
    <tr>
    <td>MyFirstTimeBound.com</td>
    </tr>
    <tr>
    <td>PublicDisgrace.com</td>
    </tr>
    <tr>
    <td>Real****ingCouples.com</td>
    </tr>
    <tr>
    <td>SexAndSubmission.com</td>
    </tr>
    <tr>
    <td>TheTrainingofO.com</td>
    </tr>
    <tr>
    <td>TheUpperFloor.com</td>
    </tr>
    <tr>
    <td>TSPussyHunters.com</td>
    </tr>
    <tr>
    <td>TSSeduction.com</td>
    </tr>
    <tr>
    <td>UltimateSurrender.com</td>
    </tr>
    <tr>
    <td>WaterBondage.com</td>
    </tr>
    <tr>
    <td>WhippedAss.com</td>
    </tr>
    <tr>
    <td>WiredPussy.com</td>
    </tr>
    <tr>
    <td>Kink Raw Test Shoots</td>
    </tr>
    <tr>
    <td>Mean Couple</td>
    </tr>
    <tr>
    <td>Pissing.com</td>
    </tr>                          
            </tbody>
            </table>
        </div>

  4. #4
    Join Date
    Jun 2009
    Location
    Chi town. IL68 ICAO code home airport, literally.
    Posts
    153
    You did link your CSS to an external sheet which is great. Now instead of styling all your code in the HTML its self, use the CSS to style. Simply create a new sheet titled index.css and add all your styling in there. That way your HTML is very easy to read and it increases speed of your website.

    As for you links try the following:
    HTML Code:
    a:link { color: red; }
    a:visited { color: red; } 
    a:hover { color: blue; } 
    I simply removed the curyly braces for you...You had two too many.
    For want of a nail...the horseshoe was lost. For want of a horseshoe, the steed was lost. For want of a steed...the message was not delivered. For want of an undelivered message.....the war was lost.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles