Hi guys! I'm working on my site, but I am having trouble with CSS.
I have a css file and I put the little code thing on my test page to see if it works, but it doesn't.
Help?
Offline
I don't bother with external style sheets. I just put the css in the web page HTML
Offline
16Skittles wrote:
I don't bother with external style sheets. I just put the css in the web page HTML
But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.
Are you using this code?
<link rel="stylesheet" type="text/css" href="URL">
Offline
coolstuff wrote:
16Skittles wrote:
I don't bother with external style sheets. I just put the css in the web page HTML
But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.
Are you using this code?Code:
<link rel="stylesheet" type="text/css" href="URL">
well, i don't have an actual web site. I'm talking about my test in frontpage.
Offline
coolstuff wrote:
16Skittles wrote:
I don't bother with external style sheets. I just put the css in the web page HTML
But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.
Are you using this code?Code:
<link rel="stylesheet" type="text/css" href="URL">
Should I like to my css file? Like www.websitename.com/style1.htm?
Offline
Dazachi wrote:
coolstuff wrote:
16Skittles wrote:
I don't bother with external style sheets. I just put the css in the web page HTML
But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.
Are you using this code?Code:
<link rel="stylesheet" type="text/css" href="URL">Should I like to my css file? Like www.websitename.com/style1.htm?
First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.
On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:
<style type='text/css"> or anything other than pure formatting.
Offline
coolstuff wrote:
Dazachi wrote:
coolstuff wrote:
But External style sheets are SO MUCH more useful. In fact, it's ridiculous to go without them.
Are you using this code?Code:
<link rel="stylesheet" type="text/css" href="URL">Should I like to my css file? Like www.websitename.com/style1.htm?
First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.
On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:
<style type='text/css"> or anything other than pure formatting.
Yeah, I meant .css.
And I just was copying some code from w3schools to test it and it doesn't work.
Offline
Dazachi wrote:
coolstuff wrote:
Dazachi wrote:
Should I like to my css file? Like www.websitename.com/style1.htm?First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.
On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:
<style type='text/css"> or anything other than pure formatting.Yeah, I meant .css.
And I just was copying some code from w3schools to test it and it doesn't work.![]()
Mind if I look at the source code? I have considerable experience in website design
Run my own website, made a few layouts for other people...
Offline
coolstuff wrote:
Dazachi wrote:
coolstuff wrote:
First off, your CSS file has to be ending with .css as the extention, not .htm or .html.
And then put that code in the HTML page you want to embed it into.
On the CSS stylesheet, you don't need anything but the CSS content. So you don't need this:
<style type='text/css"> or anything other than pure formatting.Yeah, I meant .css.
And I just was copying some code from w3schools to test it and it doesn't work.![]()
Mind if I look at the source code? I have considerable experience in website design
Run my own website, made a few layouts for other people...
Ok.
www.dazachi.webs.com/style1.css
www.dazachi.webs.com/test.htm
I'm using t35 to host, but testing with webs.
Offline
The HTML you want to modify should be in test.htm, not style1.css
Offline
Dazachi wrote:
gershmer wrote:
The HTML you want to modify should be in test.htm, not style1.css
I'm trying to put a navbar on all my pages with css.
You can't. That's not what CSS does. It styles the navbar. Not creates it.
I recommend, if your so lazy, instead of typing the code everytime, use iframes.
1. Create a page that contains the HTML for the navbar (this will be a universal page, displayed on all pages, when you put in the iframe code) and be sure to link the CSS to it.
2. Use this code:
<iframe src ="URL TO NAVBAR PAGE" width="WIDTH" height="HEIGHT" frameborder="0" scrolling="no">
Put this wherever you want in any of your pages where a navbar is needed.
Offline
Dazachi wrote:
gershmer wrote:
The HTML you want to modify should be in test.htm, not style1.css
I'm trying to put a navbar on all my pages with css.
Which you can't do. If want to do that, rename all of your pages with a .php extention, make another page for the navbar, and use PHP Include() to do that.
Here's the code to include:
<?php include("Page with navbar") ?>And it's just that simple! You'll have to take the lists out of the CSS page though.
I would STRONGLY advise against using iframes as Gershmer suggested, because they are not at all flexible. Only use them if you absolutely must.
By the way, PHP include won't work with Webs, because it doesn't have PHP. But when you transport it on to t35, it'll work. Why don't you just test it there?
Last edited by coolstuff (2010-05-01 09:34:48)
Offline
coolstuff wrote:
Dazachi wrote:
gershmer wrote:
The HTML you want to modify should be in test.htm, not style1.css
I'm trying to put a navbar on all my pages with css.
Which you can't do. If want to do that, rename all of your pages with a .php extention, make another page for the navbar, and use PHP Include() to do that.
Here's the code to include:Code:
<?php include("Page with navbar") ?>And it's just that simple! You'll have to take the lists out of the CSS page though.
I would STRONGLY advise against using iframes as Gershmer suggested, because they are not at all flexible. Only use them if you absolutely must.
By the way, PHP include won't work with Webs, because it doesn't have PHP. But when you transport it on to t35, it'll work. Why don't you just test it there?
When PHP is run by the browser, the end-user HTML is iframes.
Try it. Create something with php include, and then view the source after it has run on your webserver. IFRAMES.
Offline
Dazachi wrote:
I'm confused again. I don't know anything about php. Is it like a whole new language or something?
It's a server-side language.
http://PHP.net
Offline
Dazachi wrote:
So I should use iframes now?
When php is compiled so it can be run on a server, all the includes turn into IFRAMES,
Offline
Dazachi wrote:
I am so confused. Which way is the easiest, but still looks good?
Easiest is using internal CSS (ex: <style type="text/css">Code</style>). But it is very messy for you to code your page with a bunch of CSS code in there. So I fully recommend external.
Offline
adriangl wrote:
Dazachi wrote:
I am so confused. Which way is the easiest, but still looks good?
Easiest is using internal CSS (ex: <style type="text/css">Code</style>). But it is very messy for you to code your page with a bunch of CSS code in there. So I fully recommend external.
I was told CSS is only for styling? Not for making navbars.
Offline
Well, there's a really nice site called w3schools I think, and it has really good CSS coding help.
Offline
J0j2 wrote:
Well, there's a really nice site called w3schools I think, and it has really good CSS coding help.
He was using some code from there, but it didn't work.
Offline