-
how to get css to work
hi, im a total noob when it come to linux, anyhow i've manage to get up an apache2 web server, with basic configuration. I want to implement CSS, but i can't seem to get it to display the result on my web page, any idea what im doing wrong?
i have every under /home/user/public_html/
i have this in my index.html
<html>
...
...
<link rel='stylesheet' type='text/css' href='mycss.css'
....
....
</html>
my css script:
td { color: #000000; }
-
Senior Member
registered user
Open one of your saved html pages in an editor and see how they do it.
For example:
Code:
<link rel="StyleSheet" href="themes/ExtraLite/style/styleNN.css" type="text/css">
That is a sever generated page with the path used being recognised as relevent to the servers configured top directory. Which ids basically what you seem to be looking for.
Or if you arn't using a local server, then you would need to use an absolute path.
Some browsers will have a "preferences" option to use a local stylesheet. In that case the page configured path will be over-ridden, but the local absolute path will need to be supplied as a parameter to the browsers preferences.
In opera i have ...
Avanced page -> content -> Style options -> My style sheet -> /home/jmd/styles/default.css
Your example above just lacks a full path ... I'd try creating a directory under your servers "root" directory and make the path look something like
"style_directory/mycss.css"
or possibly
"/style_directory/mycss.css"
By the way, style sheets are a really handy way to get different sites to render their pages -=- Your Way -=- (grin).
As they all seem to run very similar site sw, mostly, a lot of the "class" labels and such will be the same. So by doing a "wget" on their sheet(s), a person can easily construct a configuration suitable to themselves. That will work with pages from a number of different sites. As long as the browser allows for a local sheet to over-ride the sites of course.
Site pages used to drive me totally crazy untill i stumbled on that trick 
jm
Similar Threads
-
By ml2 in forum Hdd Install / Debian / Apt
Replies: 0
Last Post: 10-23-2007, 08:36 PM
-
By RedCharlie in forum Networking
Replies: 1
Last Post: 02-28-2005, 12:32 AM
-
By Mokoshi in forum Hardware & Booting
Replies: 3
Last Post: 02-17-2004, 04:52 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Lenovo - Yoga 7i 2-in-1 16" 2K Touchscreen Laptop - Intel Core Ultra 5 Proces...
$749.99

Lenovo ThinkPad L15 Gen 3 15.6" 16GB, Thunder Black
$241.50

Lenovo ThinkPad T14 G2 14-Inch AMD Ryzen R5 5650U 16GB, 512GB SSD Win 11 Pro
$398.99

Lenovo ThinkPad T14 Gen 2 14" i7-1165G7 2.80GHz 16GB RAM 512GB SSD Windows 11
$284.99

LENOVO THINKPAD T14 GEN 2i CORE I7-11165G7 2.8GHZ 16GB 256 SSD WCAM WI1 CORD
$235.00

LENOVO THINKPAD P15S GEN 2i CORE I7-1185G7 2.8GHZ 32GB 512GB NVIDIA T500 W11
$300.00

Lenovo - IdeaPad Slim 3 15.6" Full HD Laptop - AMD Ryzen 5 40 2025 - 8GB Memo...
$379.99

Lenovo ThinkPad T14 Gen 2 i5-1145G7 16GB 512GB SSD Touch Win 11 Pro Good
$261.99

Lenovo ThinkPad L15 Gen 3 15.6" 16GB, Thunder Black
$241.50

Lenovo ThinkPad laptop T490 14" i5 8365U 16GB NEW 256gb SSD WIN 11 pro CAM WIFI
$249.99