My html file links to my external style sheet when im working in dreamweaver, but when I preview in browser, no styles. When I view in dreamweaver live mode i see the body background-color and the divs are in place. but no borders. When I preview in firefox, no styles at all. I will provide the code. Thanks, please help.
html code: -
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
-
<head>
-
-
<link href="/css/main_layout.css" rel="stylesheet" type="text/css" />
-
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
-
<title>Talk Tampa Sports</title>
-
-
</head>
-
-
<body>
-
-
<div id="wrapper">
-
-
<div id="header">
-
</div>
-
-
<div id="navbar">
-
</div>
-
-
<div id="leftsidebar">
-
</div>
-
-
<div id="rightsidebar">
-
</div>
-
-
<div id="maincontent">
-
</div>
-
-
<div id="footer">
-
</div>
-
-
</div>
-
-
</body>
-
-
</html>
-
css code: -
body {
-
background-color: #060;
-
}
-
-
#wrapper {
-
width: 960px;
-
height: inherit;
-
margin: auto;
-
background-color: white;
-
border: solid, 1px, black;
-
}
-
-
#header {
-
width: 960px;
-
height: 100px;
-
border-bottom: solid, 1px, black;
-
}
-
-
#navbar {
-
height: 10px;
-
width: 960px;
-
border-bottom: solid, 1px, black;
-
}
-
-
#maincontent {
-
width: 608px;
-
height: 500px;
-
border-bottom: solid, 1px, black;
-
border-right: solid, 1px, black;
-
padding: 2px;
-
margin-left: 176px;
-
font: Verdana, Geneva, sans-serif, 1em, black;
-
}
-
-
#leftsidebar {
-
width: 174px;
-
height: 500px;
-
float: left;
-
border-bottom: solid, 1px, black;
-
border-right: solid, 1px, black;
-
padding: 2px;
-
}
-
-
#rightsidebar {
-
width: 174px;
-
height: 500px;
-
float: right;
-
border-bottom: solid, 1px, black;
-
padding: 2px;
-
}
-
-
#footer {
-
width: 960px;
-
height: 100px;
-
}
-
Try this -
<link href="../css/main_layout.css" rel="stylesheet" type="text/css" />
-
7 7710
You need to get rid of the commas in some of your rules, specifically the border and font rules.
Should be like the following: -
#header{
-
border: 1px solid black;
-
font: 1em black Verdana, Geneva, sans-serif;
-
}
-
thanks that helps a lot but I still get no style in my browser. everything looks perfect on dreamweaver, borders show in live mode now. I still get a blank white screen in my browser.
Try using an absolute path to your css file.
Where is your html file stored and where is your css file stored?
The html file is in a folder called html and the css file is in a folder called css. Both of those folders are contained in the same folder. I tried the absolute path and it is still not working.
Try this -
<link href="../css/main_layout.css" rel="stylesheet" type="text/css" />
-
thanks, that was the one. so what do those dots mean? andapparently they are required? Thanks for all your help.
The dots are there for going up a level in your directories. Because your html file is stored in its own folder you need to tell it to get out of that folder then into the css folder to the css file.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Ray Torres |
last post by:
I would appreciate any help with the following problem.
I have several different htm pages with (simalar) forms that are
processed by the same
PHP script. If there is data missing on the form,...
|
by: Richard |
last post by:
I have a SVG document with links out to html pages which works when
you run the SVG file i have tried to intergrate it into a coldfusion
page and the links no longer work.
The SVG file is :
...
|
by: NoSpamThankYouMam |
last post by:
I am looking for a product that I am not sure exists.
I have bookmarks to webpages in Internet Explorer, Mozilla
Firefox, Opera, Netscape Navigator, and on a "Favorite
Links" page on my website....
|
by: Paul |
last post by:
Not sure if this is the right place for a CSS question but I saw some other
CSS posts so here goes a pretty basic question.
I want the color of an HTML link to be blue on one section of my HTML...
|
by: Aristotelis Pitaridis |
last post by:
I am trying to extract all the links and the image URLs from an HTML file. I
tried to read byte - byte the information in order to detect the URLs but it
did not work because some JavaScript or...
|
by: leslietulip |
last post by:
Greetings - this is the first time I am posting to this forum. I am using Javascript to ensure that the user enters all required fields in a form. However, this form is being spammed to death with...
|
by: Murray R. Van Luyn |
last post by:
Hi,
Does the JavaScript menu on this site work for your browser? Which browsers
doesn't it work with, and how important are they?
When I changed the site to use the new menu, traffic halved....
|
by: kristin09 |
last post by:
Hi guys,
I have a windows mobile application that has html pages generated on the fly (some pages have links in them). With the new browser MSIE 6.0 the links on the pages are not read as links....
|
by: mcelrob5 |
last post by:
Ok I am writing a portlet using jsp with embedded java. The Java code accesses a file stored in a folder on a drive which contains HTML files located in the same folder however when i create links to...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |