Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Icon on CSS page

Status
Not open for further replies.

cluM09

Technical User
May 15, 2004
127
US
Hello,

I am new to HTML page design. I need help with how to place the icon on the page.

I have a css page that I need to have the icon displayed at the top left corner of the page.

How can I add the icon to the top left corner of the page like the HTA page wher I just have icon="icon.ico" to display the icon?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>List Group Membership</title>
<style type="text/css">
/* Default CSS Stylesheet for a new Web Application project */
body{background-color:#cdd4e6; margin:20 20 20 0; color:#444444;}
td{font-family:Arial, Helvetica, sans-serif; font-size:11px;}
select{font-family:Arial, Helvetica, sans-serif; font-size:11px;}
input{font-family:Arial, Helvetica, sans-serif; font-size:11px;}
a{font-family:Arial, Helvetica, sans-serif; font-size:11px;color:#444444;}

/* Custom */
td.header{background-color:#7f92bf; color:#ffffff; font-size: 20px; padding-left:15px;}
td.content{padding:15 15 15 15; background-color:#ffffff;}
td.title{color:#7f92bf; font-size:10px;}
td.error{color: #ff0000}

/* Tabs */
a.tablink{font-weight:bold;text-decoration:none;}
.tabline{border-bottom:1px solid #CCCCCC}
.tab{border-top:1px solid #CCCCCC;border-right:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC;padding:3 5 3 5;border-left:1px solid #CCCCCC;background-color:#eeeeee}
.tabactive{border-top:1px solid #CCCCCC;border-right:1px solid #CCCCCC; border-left:1px solid #CCCCCC;padding:3 5 3 5;}

/* Grid */
td.gridheader{padding:3 3 3 3; font-weight:bold; background-color:#eeeeee;}
td.gridcell{padding:3 3 3 3;border-bottom:1px solid #eeeeee}
</style>

<!-- ****************VBSCRIPT Starts here ********************* -->
 
I asked the same question about 3 years ago. Nobody replied and I couldn't find anything on the net either.
 
Not sure if I properly understand the layout needed. Try something like this see if it is what is looking for.
[tt]
body {
[blue]background-image:url([green]icon.ico[/green]);
background-attachment:fixed;
background-repeat:no-repeat;
background-position:top left;[/blue]
background-color:#cdd4e6;
margin:20 20 20 0;
color:#444444;
}
[/tt]
 
tsuji,

Thank you for the response.

The code you provided placed the icon on the top left corner of the page, but that is not what I wanted.

I want to have the icon displayed at the SYSMENU like that of the HTA page. I want to have the equivalence of the HTA icon as the code listed below.

<HTA:APPLICATION
BORDER = "thick"
ID="HTAUI"
APPLICATIONNAME="My HTA Application"
MAXIMIZEBUTTON="no"
MINIMIZEBUTTON="no"
SCROLL="no"
SINGLEINSTANCE="yes"
WINDOWSTATE="maximized"
SYSMENU="yes"
ICON="icon.ico"
>
 
I am not sure if you can change that icon (ie's for ie, netscape's for netscape, firefox's for firefox...) That falls more on the security concern in the broad picture. You can do it in hta simply using icon="icon.ico" precisely because the security is behind it. In moz, you can probably do the same using xul technology to change the chrome? But for html page, probably not, in particular for ie which is not opensource.

Do not take my words to the letter. I cannot say for sure.
 
I am still not following the need. Are you saying you want to specify the image used on Tabs in IE and Firefox? Similar perhaps to what the Tek-Tips site is doing?

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
markdmac,

When a script (VBScript or JScript) is integrated with an HTA to produce a form, there is an option to have the icon displayed on the upper left corner called SYSMENU. With the use of the CSS page to format the page in HTA, I cannot display the icon as I normally do with only HTML of the HTA where I can set ICON = "NAMEOFICONFILE.ICON".

That is the reason why I want to know if there is a way to display the icon in the CSS page. See my post above.
 
You may consider to ask in a more suited forum like:
forum215

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top