PDA

View Full Version : Problem in linking



psspl
03-13-2008, 07:57 AM
1) Script Title: ddaccordion.js

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ddaccordionmenu.htm

3) Describe problem:

Hello friends,

I have recently used the script ddaccordion.js for dynamic menu....
I am using it for the Menu of my web page which i m developing using ASP.net with c# coding.
I made a style sheet "MenuStyle.css" wherein i Copied the code:


.arrowlistmenu
{
width: 225px; /*width of accordion menu*/
}
.arrowlistmenu .menuheader
{
/*CSS class for menu headers in general (expanding or not!)*/
font: bold 14px Arial;
color: white;
/*background: black url(MenuImages/titlebar.png) repeat-x center left;*/
background: black url(../../themes/MenuStyle/MenuImages/titlebar.png) repeat-x center left;
margin-bottom: 10px; /*bottom spacing between header and rest of content*/
text-transform: uppercase;
padding: 4px 0 4px 10px; /*header text is indented 10px*/
cursor: hand;
cursor: pointer;
}
.arrowlistmenu .openheader
{
/*CSS class to apply to expandable header when it's expanded
background-image: url(../MenuImages/titlebar-active.png);*/
background-image: url(../../themes/MenuStyle/MenuImages/titlebar-active.png);
}
.arrowlistmenu ul
{
/*CSS for UL of each sub menu*/
list-style-type: none;
margin: 0;
padding: 0;
margin-bottom: 8px; /*bottom spacing between each UL and rest of content*/
}
.arrowlistmenu ul li
{
padding-bottom: 2px; /*bottom spacing between menu items*/
}
.arrowlistmenu ul li a
{
color: #FFFFFF;
background: url(../../themes/MenuStyle/MenuImages/arrow2.gif) no-repeat center left; /*custom bullet list image*/
display: block;
padding: 2px 0;
padding-left: 19px; /*link text is indented 19px*/
text-decoration: none;
font-weight: bold;
border-bottom: 1px solid #dadada;
font-size: 100%;
}
.arrowlistmenu ul li a:visited
{
color: #A70303;
font-size: 100%;

}

.arrowlistmenu ul li a:hover
{
/*hover state CSS*/
color: #A70303;
background: url(../../themes/images_template1/bg_content.jpg)

}

and on my master page i linked the style sheet .
I placed the images in the folder Menu Images.

Though i have created MenuStyle.css I have to write the whole code for the style sheet in every page which I inherit from the master page.

So please anyone can help me out.
Thanks in advance.

rangana
03-13-2008, 08:07 AM
You should note the proper posting (http://www.dynamicdrive.com/forums/showthread.php?t=24866) guidelines, see post#7.

Anyway, have you tried using ../themes/images_template1/bg_content.jpg instead. If nothing works, you could use absolute addressing,

..And if nothing still works, a link to your page will aide ;)

codeexploiter
03-13-2008, 08:09 AM
You can create a CSS file in which you can insert all the required CSS information and include that file using <link> element in your <head> element.

An eg:
<link rel="stylesheet" type="text/css" href="default.css" />

Or you can go for templating scheme in which you need to load the CSS only once.

Or you can load the CSS file via JS when the page loads for that purpose you have to insert a script in everypage

psspl
03-13-2008, 08:37 AM
hello sir
i have put the link tag :

<link rel="Stylesheet" type="text/css" href="../themes/MenuStyle/MenuStyleSheet.css" />

on the master page. but the images are not getting displayed on the page which is inherting the master page.
Please help me out.

codeexploiter
03-13-2008, 08:44 AM
Instead of using the relative path try to use absolute paths and see if it is a problem of file arrangement.

psspl
03-13-2008, 09:15 AM
sir the problem is resolved... but the menu runs perfect when run on Mozilla Firefox,but the problem remains when run with IE7. I am using IE as my default browser.

psspl
03-13-2008, 09:20 AM
sir is there any solution to the problem regarding the browser support.

rangana
03-13-2008, 09:28 AM
Can you provide a link to your site :)

psspl
03-13-2008, 09:43 AM
I am running it on my localhost. the site is in developing phase still.

rangana
03-13-2008, 09:49 AM
Have you had added a proper DTD (http://www.w3.org/TR/html401/sgml/dtd.html) in your page?..

Try adding this code above the <html> tag.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


See if it helps ;)

codeexploiter
03-13-2008, 10:05 AM
If you can attach all the code images then we'll be able to have a peek at the problem. It is really difficult to guess what is happening at your end without actually seeing it.

psspl
03-13-2008, 10:09 AM
Have you had added a proper DTD (http://www.w3.org/TR/html401/sgml/dtd.html) in your page?..

Try adding this code above the <html> tag.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


See if it helps ;)
Hello rangana,the code above the html tag in my master page is :::

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Is it ok or i have to change it.

rangana
03-13-2008, 10:11 AM
It's fine. As what codeexploiter said, could you zip in all your codes since its not online...we'll try to figure this one out ;)

codeexploiter
03-13-2008, 10:14 AM
A strict DTD is recommended when it is possible but a transitional DTD will make no fuss. Your DTD seems to be a valid one

psspl
03-13-2008, 11:26 AM
Hello "codeexploiter" and "rangana"

The problem is solved for both firefox and IE.
I cleard the browser history in both firefox and IE along with their cookies,and everything was in its place working perfect.

Thanks to both of you for your spontaneous help and assistance in guiding me as i m new to this proffesional world of coding.