• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 171
  • Last Modified:

Html - main page

How can I remove link underline and change color to font to white. Also, I want to place this links in the middle of the cell like image and change font color.


<head>
</head>
<body>
    <div id="menu" style="background-color: #4d8f75;">
        <img src="test.gif" />
        <a href="http://mysite/home.html">Home</a>
        <a href="http://mysite/documents.html">Documents</a>
        <a href="http://mysite/purchased.html">Purchased</a>
        <a href="http://mysite/Ordered_by.html">Orderedby</a>
        <a href="http://mysite/internal_sales.html">Internal Sales</a>
        <a href="http://mysite/Customername.html">Customer Name</a>
       
    </div>
    <div>
        Content goes here
    </div>
</body>
</html>
main-page.jpg
main-page.jpg
0
VBdotnet2005
Asked:
VBdotnet2005
  • 3
  • 2
2 Solutions
 
Jerry MillerCommented:
You want to use this in your CSS or in the styles on the page.
a:link {
    text-decoration: none;
}

http://www.w3schools.com/css/css_link.asp
0
 
VBdotnet2005Author Commented:
Like this?

 <a href="http://mysite/home.html" style="color: #FFFFFF"; style="text-decoration: none">Home</a>
0
 
Jerry MillerCommented:
That should work, but you have to do it for every link on the page. The easier way to do it is to either use a CSS stylesheet page or put one in the page like this.

  <style type="text/css">
       .linkStyle
        {
         color: #FFFFFF;
         text-decoration: none
        }
    </style>

Then in your links, reference the class like this.

         <a href="http://mysite/home.html" class="linkStyle">Home</a>
         <a href="http://mysite/documents.html" class="linkStyle">Documents</a>
         <a href="http://mysite/purchased.html" class="linkStyle">Purchased</a>
         <a href="http://mysite/Ordered_by.html" class="linkStyle">Orderedby</a>
         <a href="http://mysite/internal_sales.html" class="linkStyle">Internal Sales</a>
         <a href="http://mysite/Customername.html" class="linkStyle">Customer Name</a>
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jerry MillerCommented:
Put the style type between your <head></head> tags

<head>
<style type="text/css">
        .linkStyle
         {
          color: #FFFFFF;
          text-decoration: none
         }
     </style>
</head>
0
 
VBdotnet2005Author Commented:
Hi jerry,

I appreciated your help. One of my question above is  I want to place this links in the middle of the cell like image and change font color. How can I accomplish this?
0
 
Jim RiddlesPrepress/OMS SpecialistCommented:
VBDotnet2005,

I would use this approach.  You can add to and clean up the styles and formatting as needed.

Notice that all styling is done in the headers.  This makes for easier code maintenance.

<html>
<head>
<style>
#menu {
height:72px;
background-color:#4d8f75;
font-size:12pt;
line-height:72px;
}
#menu img {
float:left;
width:120px;
height:72px;
padding-right:18px;
}
#menu a {
text-decoration:none;
color:fff;
padding-right:9px;
}
.clearFloat {
clear:both;
}
</style>
</head>
<body>
	<div id="menu">
		<img src="test.gif" />
		<a href="http://mysite/home.html">Home</a>
		<a href="http://mysite/documents.html">Documents</a>
		<a href="http://mysite/purchased.html">Purchased</a>
		<a href="http://mysite/Ordered_by.html">Orderedby</a>
		<a href="http://mysite/internal_sales.html">Internal Sales</a>
		<a href="http://mysite/Customername.html">Customer Name</a>
	</div>
	<br class="clearFloat">
	<div>
		Content goes here
	</div>
</body>

Open in new window

0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now