Thread: Text color help

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    112
    Rep Power
    7

    Text color help


    I have a text link menu I want to change the text to white. I also want to be able to adjust the width of the background color, currently is spans the entire page. I would like to make the background color just as wide as the text menu. Here is my current CSS and text menu code.

    text code:

    PHP Code:
    <class="tcolor"><a style="text-decoration:none" href="index.php?page=home_page">Home Page</a> |  <a style="text-decoration:none" href="index.php?page=site_layout">Site Layout</a> |  <a style="text-decoration:none" href="index.php?page=control_structures">Control Structures</a> | <a style="text-decoration:none" href="index.php?page=string_functions">String Functions</a> | <a style="text-decoration:none" href="index.php?page=web_forms">Web Forms</a> | <a style="text-decoration:none" href="index.php?page=midterm_assessment">Midterm Assessment</a> | <a style="text-decoration:none" href="index.php?page=state_information">State Information</a> | <a style="text-decoration:none" href="index.php?page=user_templates">User Templates</a> | <a style="text-decoration:none" href="index.php?page=final_project">Final Project</a></p
    CSS Code for text links:

    PHP Code:
    #text_links
        
    {
            
    background-color:blue;
            
    color:white;
            
    text-align:center;
            
    font-family:"Times New Roman";
            
    font-size:14px;        
        } 
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Location
    Irvine, CA
    Posts
    1
    Rep Power
    0
    Hope this helps.

    Code:
    <!DOCTYPE html>
    
    <head>
    <meta charset="utf-8" >
    
    <style>
    
    <!-- wrapper for the entire site-->
    #wrapper{
    	;
    	margin-left:none;
    	margin-right:none;
    	width:80%;
    	}
    <!-- link styles -->	
    a{
    	color:#FFF;
    	}
    	
    <!-- this is how a class is declared-->
    .tcolor{
    	background-color:#00F;
    	color: white;
    	text-align:center;
    	font-family:Verdana, Geneva, sans-serif;
    	font-size:16px;
    	}
    	
    </style>
    <title>Untitled Document</title>
    </head>
    
    <body>
    <div id="wrapper">
    <p class="tcolor"><a style="text-decoration:none" href="index.php?page=home_page">Home Page</a> |  <a style="text-decoration:none" href="index.php?page=site_layout">Site Layout</a> |  <a style="text-decoration:none" href="index.php?page=control_structures">Control Structures</a> | <a style="text-decoration:none" href="index.php?page=string_functions">String Functions</a> | <a style="text-decoration:none" href="index.php?page=web_forms">Web Forms</a> | <a style="text-decoration:none" href="index.php?page=midterm_assessment">Midterm Assessment</a> | <a style="text-decoration:none" href="index.php?page=state_information">State Information</a> | <a style="text-decoration:none" href="index.php?page=user_templates">User Templates</a> | <a style="text-decoration:none" href="index.php?page=final_project">Final Project</a></p>  
    
    </div>
    </body>
    </html>
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    112
    Rep Power
    7
    thanks for that. What is the purpose of the wrapper?
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2012
    Posts
    112
    Rep Power
    7
    ok ive got a <ul> vertical menu formatted as follows in CSS:
    PHP Code:
    .glossymenu{
    list-
    style-typenone;
    margin5px 0;
    padding0;
    width145px;
    bordernone;
    border-bottom-width0;
    }

    .
    glossymenu li a{
    backgroundwhite url(Images/glossyback.gifrepeat-x bottom left;
    fontbold 13px "Lucida Grande""Trebuchet MS"VerdanaHelveticasans-serif;
    colorwhite;
    displayblock;
    widthauto;
    padding3px 0;
    padding-left10px;
    text-decorationnone;

    }


    html .glossymenu li a/*IE only. Actual menu width minus left padding of A element (10px) */
    width120px;
    }

    .
    glossymenu li a:visited, .glossymenu li a:active{
    colorwhite;
    }

    .
    glossymenu li a:hover{
    background-imageurl(Images/glossyback2.gif);

    How can I apply the same formatting to the text menu at the beginning of this thread?
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    16
    Rep Power
    0
    I am not sure what you are asking. The wrapper was to wrap the body of the HTML document to give it the middle alignment. Do you want the menu to have middle alignment?

IMN logo majestic logo threadwatch logo seochat tools logo