dreamweaver ignores css files - css

<link href="/qbaccounting.ca/_css/qba_main.css"
rel="stylesheet" type="text/css">
<link href="/qbaccounting.ca/_css/qba_content.css"
rel="stylesheet" type="text/css"
here is my css link in my dreamweaver web page. when i see it in drw, it looks good, text centered, color white, nice background, logo image, but when i upload it to the server it is as if there is no css file at all, no image, and text half centered, half not.
tried deleting index and css files, copied instead of put, nothing works.
what to do?

Your second link tag is missing the closing >

Related

Twitter Bootstrap makes background image dissappear

In my main css file I have this:
background: url(/images/bg_1.jpg) repeat;
And it works fine, I have a background image showing. But when I include the bootstrap.min.css v3.1.1 file in the html (above my css file in the code), the background just goes white.
<link rel="stylesheet" type="text/css" href="/CSS/bootstrap.min.css" />
Any ideas why?
Chances are the bootstrap.min.css contains a css declaration which has a higher specificity
on the element(s) in question. Use firebug or the chrome inspector to look at the styles being applied to this element. You'll be able to see which css declration has a higher specificity and which has therefore overridden your main.css declaration.

I am using tiles but the css file of baselayout wont be applied on all pages

the problem is that I have a css file that is pointed from my baselayout.jsp file as following, when I am in index.php it applies the css but when I move to Profile/view.jsp it does not.
when I look at the source I noticed it is looking the css file in Profile/stylesheets/Base.css rather than myproject/stylesheets/Base.css, how to point to it in a way that works on all pages.
<link href="<s:url value="/stylesheets/mycss.css"/>" rel="stylesheet"
type="text/css" />
Its a breeze, just change the address to solid address, as following
http://www.example.com/myPreoject/stylesheets/Base.css

How to print web page with all its applied css?

I want to print my table that contains some css styles too. But whenever I run window.print(), the output appears without any applied css to styling headers and footers.
I've used <link rel="stylesheet" href="print.css" type="text/css" media="all" /> in my code. Also I tested it with media="print". But still I have a print preview without any style.
What should I do?
media=print should do.
Make sure you have also checked the "print images and colors" in page setup while seeing the Print Preview.

How to define color and background-color of a element for print version

I'm working in the app need print version for a data table from db. I using 2 css files for view in browser and for a print version:
<link rel="stylesheet" href="style.css" type="text/css" />
<link rel="stylesheet" href="print.css" type="text/css" media="print" />
All align , position ... was shown fine. Just only I can't see the color and background-color of some elements like div , td (of table) ...
The 2 css files for browser and print are the same, just only the print.css have to define some divs will be hidden like button "print it!"
I tested in firefox.
any helpful? Thank you!
You can't do that in your CSS sheet. Navigators disable automatically background-color and background-image.
When you click on the print button in your navigator, you will see that under Appearance "Print background color" and "Print background color" are off by default and nobody can change default settings :-)
Define print-specific rules in the print CSS file..
*You might wanna mark first css link element with attribute media="screen"

how can I print a web page with all its css style attached to the page?

I want to add a print button to enable users to print my web page. However when I print all the css styles are lost. It seems the printer only keeps the basic html elements. If I also want to print out the page exactly as it looks like in a browser, what should I do? I mean if I use a color printer it will print a colorful page with css styles on it. When I use a black and white printer it should print light colors as white and dark colors as grey or black.
If you have media="screen" on your link element, try to remove it or replace with media="all".
Take a look at this and this, that should help.
Basically you need to add a css print statement.
<link rel="stylesheet" href="URL to your print.css" type="text/css" media="print" />
CSS style-sheets have an attribute media. It specifies to what media this css is applicable. Possible media types are listed here.
<style type="text/css" media="all">
#import "myCss.css";
</style>
OR
<link rel="stylesheet" type="text/css" media="print" href="print.css">

Resources