|
I'm trying to create a tableless website. When using external stylesheet, the background-image property alone is not working with my external stylesheet. Other properties are working fine with the external stylesheet. I'm getting fuzzed to continue.
My external stylesheet (style.css) and is placed in folder 'css' code is:
The image is in folder 'images'.
When surfng the google with 'background-image not working in external stylesheet' i found that if we place css in different folder and made a call for an image in differnt folder we've to give mention as
background-image:url("../images/disdat-gold-red.gif");
- even this failed.
Again when searched, i found that instead of saying 'background-image' give code as follows for which they answered it worked fine. And the code is:
background: #000000 url(images/disdat-gold-red.gif) repeat-x; - even this get failed for me.
I'm attaching my html file along with my css file.
Coding part in "style.css"
#header
{
text-align:center;
font-family:arial, verdana, 'times new roman';
font-size:15pt;
font-weight:bold;
color:#0ac0af;
padding:2% 0 15% 0;
background:url(images/disdat-gold-red.gif) no-repeat;
}
HTML code is:
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Try Web Page</title>
<link type=text/css rel=stylesheet href=css/style.css>
</head>
<body>
<div id="container">
<div id="top">
<div id="header">Inside Header Top Container</div>
<div id="nav">Inside Nav Top Container</div>
</div>
<div id="main">
<div id="left">Inside Left Main Container</div>
<div id="right">Inside Right Main Container</div>
</div>
<div id="footer">Inside footer Container</div>
</div>
</body>
</html>
M.Sworna Vidhya
|
|
|
|
|
I tried your code it is working here fine at my end.
Keep the images in image folder.
Keep style sheet file in css folder.
Both of these folders (image and css) should be
at the same level of your folder hierarchy.
Now when you are referring image file try to refer it as follows.
background-image:url("../images/disdat-gold-red.gif");
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thank you, desai. Now it works for me.
|
|
|
|
|
My Pleasure.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Make all of your references relative to the root (start with /). Or use a base tag.
|
|
|
|
|
Hello Friends
I am using object tag in .html file and getting its Id in javascript code bu using document.getElemenById("view");
When I run in IE,it is returning the exact element.
but when I run the same in Firefox then It is just returning Object html Element.Now the exact elemt whose Id i am passing.
Do I need to change some internet option for browser or do I ned to change in java script code to get exact element.
Thanks In Advance.
Regards
Yogesh
|
|
|
|
|
Try following options..
window.document["objectid"]
window.document.objectid
document.embeds.objectid
document.embeds["objectid"]
document.getElementsByName("objectid")[0]
Refer this[^] link for more information and understanding.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
Thanks A LOt Mr. Desai.
Very Helpful for me.Thanks Once again.
Regards
Yogesh
|
|
|
|
|
My Pleasure.
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
|
Watch out for spelling! Try checking HTTP_REFERER instead of HTTP_REFERRER.
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Yes I am using HTTP_REFERER. It still doesn't work.
|
|
|
|
|
HTTP REFERER is not a good way to do this as it can be faked. If your can you may want to look at using a session stored in a database that can be accessed from both server A and B. This will also require that the servers have a common domain www.mysite.com and users.mydomain.com.
Some people may have another way to handle this too.
|
|
|
|
|
|
Connection con = DriverManager.getConnection("jdbc:odbc:employee");
please tell me that the methode of defining this "jdbc:odbc:employee" string.
As mentioned in getConnnection detail in netbeans the first part jdbc is fix and the second and the third is subProtocol and subName ... so tell me please what are these three things?
I'm accessing MySQL database employee.sql using java servlet ... but i dont know this above mentioned statment mechanism so i m still failed to complete.
I've also read some bloges/etc but cant ound detail that clear my queation.
So plz me.
Also plz tell me that in most of the examples and also in above given statment they defines database in two forms,
"jdbc:mysql:employee"
or
"jdbc:odbc://localhost/employee"
so what are these location on computer or on my local mechine so shere i keep database(employee.sql) to refer them like these two ways.
THANKS TO ALL HELPERS ...
modified on Wednesday, July 14, 2010 12:23 AM
|
|
|
|
|
|
Thanks .. But thing still creates problem to me.
In this program they uses database test which is already exist ... where i dont know ..... but in case i create my own database then where i keep it and how to give database path in statment con = DriverManager.getConnection("jdbc:mysql:///test", "root", "secret");
package com.stardeveloper.example;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class JdbcExample2 {
public static void main(String args[]) {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test",
"root", "secret");
if(!con.isClosed())
System.out.println("Successfully connected to " +
"MySQL server using TCP/IP...");
} catch(Exception e) {
System.err.println("Exception: " + e.getMessage());
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
}
}
}
|
|
|
|
|
I'm trying to set the foreground color for all treeview nodes in css but cannot get it to work. I'm using the following:
{
color:black
}
How can I get this to work?
|
|
|
|
|
I hope you are referencing the objects id, class or tag...
some examples
p{
color:#000;
}
.myclass{
color:#000;
}
#myid{
color:#000;
}
You can also apply the css to all elements like
*{
color:#000;
}
The #000 is shorthand for #000000 and is black.
BTW - You are placing the style tags around your css or referencing it in a link tag?
All the Best!
|
|
|
|
|
I have access database store on the server. One of my user perform data entry from the client machine via the mapped drive.
For the other user I plan to develop web application which access via the HTML page and retrieve data from the database. Is it possible for me to do that? I plan to do that with Visual Studio 2005.
Thank,
|
|
|
|
|
It is not important whether you are using HTML or VS 2005.
Which scripting language you are using is important.
For achieving the task you are trying to do, you need to use
server side scripting language like PHP or ASP.NET or something else
like AJAX.
In short you need to call server side transaction to fetch data from
MS Access database.
HTH
Jinal Desai - LIVE
Experience is mother of sage....
|
|
|
|
|
do you know are there any article that I can read and do it?
|
|
|
|
|
|
|
I am trying to accessing SQL database from this given below code ... that i found on net. But there is problem at
Class.forName It shows error at browser ... Error is "Exception: com.mysql.jdbc.Driver". I've also tried one another example roseindia.com ... same error.
I've also tried another simple example like this from begining to class.form but again same error.
package DatabaseExample;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class DatabaseExample extends HttpServlet {
@Override
public void doGet(HttpServletRequest hsReq, HttpServletResponse hsRes) throws ServletException, IOException {
hsRes.setContentType("text/html");
PrintWriter objPrintWriter = hsRes.getWriter();
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql:///test","root", "secret");
if(!con.isClosed())
objPrintWriter.println("Successfully connected to " + "MySQL server using TCP/IP...");
} catch(Exception e) {
objPrintWriter.println("Exception: " + e.getMessage());
} finally {
try {
if(con != null)
con.close();
} catch(SQLException e) {}
}
}
}
modified on Monday, July 12, 2010 8:45 AM
|
|
|
|