Style sheets driving me crazy

Discussion non-related
User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Style sheets driving me crazy

Postby [FnG] RampantBunny » Fri May 28, 2010 10:19 pm

Hi All,

I decided to start to learn PHP, but before that i needed to brush up on my html of course, after a bit of tinkering i managed to create a standard page with top/bottom/left/right/center frames...so far so good, then i decided to give stylehseets a try...big mistake, i cant get em to work..

I've created a style sheet with the follwoing code:

H1 { font-size: x-large; color: red }
H2 { font-size: large; color: blue }

called stylemain place in folder "style"

Created a centerpage called "center.php"
With the follwoing code:
<HTML>
<HEAD>
<LINK HREF="/style/stylemain.css" REL="style sheet" TYPE="text/css">
<TITLE>Centerframe</TITLE>
</HEAD>
<BODY>
<H1>Dit is H1</H1>
<H2>Dit is H2</H2>

<CENTER>
<?php

print "CENTER tekst met php, totaal geen opmaak nu hier komt de hoofd tekst";
?>
</CENTER>
</BODY>
</HTML>

The result...nada, it displays H1 and H2 but not the colors/background, and i cant figure it out, what am i doing wrong? :gripe: (about 3hrs later)

PS: Managed to figure out styles in separate pages, but thats not what i want :P
Image
We are explorers...We have to Be...To Learn...

User avatar
[FnG] Ro3L
Posts: 406
Joined: Fri Jan 05, 2007 1:02 am
Location: Sorry, no aim =D
Contact:

Re: Style sheets driving me crazy

Postby [FnG] Ro3L » Sat May 29, 2010 12:54 am

i have decided to test some, it appears that if you put the mainstyle.css in the same map as center.php; and change the link. then it works :s

which means. if i have center.php in my fng map.( fng/center.php) and my css in my fng map (fng/mainstyle.css);

then it will see the css file.

still no idea why it does not find the css in the other map.

this is probably i broken link reference...
not sure though.


there i probably people with more knowledge of that on this forum
Image

User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] RampantBunny » Sat May 29, 2010 1:57 am

I tried the same thing, and tried it again just now :( no result, im sure im doing something silly, but what?

center.php is now:

<HTML>
<HEAD>
<LINK HREF="stylemain.css" REL="style sheet" TYPE="text/css">
<TITLE>Centerframe</TITLE>
</HEAD>
<BODY>
<H1>Dit is H1</H1>
<H2>Dit is H2</H2>

<CENTER>
<?php

print "CENTER tekst met php, totaal geen opmaak nu hier komt de hoofd tekst";
?>
</CENTER>
</BODY>

</HTML>

and stylemain.css is in the same folder:

H1 { font-size: x-large; color: red }
H2 { font-size: large; color: blue }


nothing happens..

cheers Rampy
Image
We are explorers...We have to Be...To Learn...

User avatar
[FnG] 7uh
Posts: 7958
Joined: Thu Aug 19, 2004 4:16 pm
Location: Southern Connecticut USA
Contact:

Re: Style sheets driving me crazy

Postby [FnG] 7uh » Sat May 29, 2010 4:11 am

(never mind what I wrote here; not correct CSS :oops: )
Last edited by [FnG] 7uh on Sun May 30, 2010 5:28 am, edited 1 time in total.

User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] RampantBunny » Sat May 29, 2010 11:32 am

I found it :hide: :banger: :banger: :tmaids:

Beware of the rogue space .....<LINK HREF="stylemain.css" REL="style sheet" TYPE="text/css">
should have been: <LINK HREF="/styles/stylemain.css" REL="stylesheet" TYPE="text/css">

woops
Image
We are explorers...We have to Be...To Learn...

User avatar
[FnG] Lambik
Site Admin
Posts: 2519
Joined: Tue Nov 11, 2003 5:45 pm
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] Lambik » Sat May 29, 2010 11:01 pm

I believe you always have to end with and semi-colon ";" in CSS, but not sure there.
H1 { font-size:10; color: red; }
of if your CSS is growing, a different notation might be helpful, but that's a matter of opinion.
H1
{
    font-size : 10;
    color : red;
}

CSS is very nice, but it will make you go crazy soooooooooon
while you're at it, you might wanna download some alternate web browsers too,
safari, chrome, firefox, opera, and skip IE, it's not to be trusted :tease:
that way CSS will definitly make you go crazy and you will be yanking your rabbit ears like him => :jester:
as it will work fine on one browser and show rubbish on some of the others.

w3schools has helped me a lot
same as php.net, and MySQL DML statements
_______________________________________________
"I am not a complete idiot . . . some parts are missing " :crazy:

ImageImage
Image

User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] RampantBunny » Sun May 30, 2010 10:30 pm

I always work on the assumption everyone always uses IE :brow:
Image
We are explorers...We have to Be...To Learn...

User avatar
[FnG] Rotten_Emu
Posts: 10678
Joined: Sat Oct 16, 2004 9:17 pm
Location: Das Boot, Groningen, Groningen, The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] Rotten_Emu » Tue Jun 01, 2010 7:11 pm

[FnG] RampantBunny wrote:I always work on the assumption everyone always uses IE :brow:


Boo! This is one of the reasons we need a Karma system on these boards. Remarks like these need to be punished!
Image Image

User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] RampantBunny » Tue Jun 01, 2010 8:31 pm

[FnG] Rotten_Emu wrote:
[FnG] RampantBunny wrote:I always work on the assumption everyone always uses IE :brow:


Boo! This is one of the reasons we need a Karma system on these boards. Remarks like these need to be punished!

And of course I will make sure that in the future non IE users will get the apropriate message of using the incorrect browser :sg:

*chuckles insanely*
Image
We are explorers...We have to Be...To Learn...

User avatar
[FnG] Da Kril
Site Admin
Posts: 9127
Joined: Fri Jun 11, 2004 12:30 am
Location: San Antonio, Texas (CDT)

Re: Style sheets driving me crazy

Postby [FnG] Da Kril » Tue Jun 01, 2010 9:50 pm

[FnG] Rotten_Emu wrote:Boo! This is one of the reasons we need a Karma system on these boards. Remarks like these need to be punished!

Nice catch, Emu...

Image



:tease:

User avatar
[FnG] Sphinx
Posts: 2067
Joined: Wed Oct 18, 2006 6:07 pm
Location: Normandy, France
Contact:

Re: Style sheets driving me crazy

Postby [FnG] Sphinx » Wed Jun 02, 2010 5:21 pm

:lmao:
Image
You can take my chocolate when you pry it from my cold frozen fingers
Image

User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] RampantBunny » Wed Jun 02, 2010 8:17 pm

It stays funny :lmao:

PS: and im still right :P
Image
We are explorers...We have to Be...To Learn...

User avatar
[FnG] Sphinx
Posts: 2067
Joined: Wed Oct 18, 2006 6:07 pm
Location: Normandy, France
Contact:

Re: Style sheets driving me crazy

Postby [FnG] Sphinx » Fri Jun 04, 2010 6:20 pm

I have to ask the question ... why wouldn't you use IE ...

Runs far and fast :mrgreen:
Image

You can take my chocolate when you pry it from my cold frozen fingers

Image

User avatar
[FnG] Lambik
Site Admin
Posts: 2519
Joined: Tue Nov 11, 2003 5:45 pm
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] Lambik » Fri Jun 04, 2010 7:21 pm

Mr.Sphinx wrote:I have to ask the question ... why wouldn't you use IE ... :panic:


Didn't you get the memo ???? :spruce:
IE is deprecated. :slaphead:
MS is loosing it, not cool, not 'fruity' enough, not 'tuxedo' open, yadda yadda yadda :crazy:
Building webpages for IE, is building for history past to the day before yesterday and before that. :skull:
Modern webpages should no longer be backwards compatible with an IE. :cheerleader:

@Rampy: You should go build pages for mobiles too :stars:

soon ..... :bedrime:
_______________________________________________
"I am not a complete idiot . . . some parts are missing " :crazy:

ImageImage
Image

User avatar
[FnG] RampantBunny
Site Admin
Posts: 4977
Joined: Wed Dec 10, 2003 12:34 am
Location: The Netherlands
Contact:

Re: Style sheets driving me crazy

Postby [FnG] RampantBunny » Fri Jun 04, 2010 9:11 pm

[FnG] Lambik wrote:
Mr.Sphinx wrote:I have to ask the question ... why wouldn't you use IE ... :panic:


Didn't you get the memo ???? :spruce:
IE is deprecated. :slaphead:
MS is loosing it, not cool, not 'fruity' enough, not 'tuxedo' open, yadda yadda yadda :crazy:
Building webpages for IE, is building for history past to the day before yesterday and before that. :skull:
Modern webpages should no longer be backwards compatible with an IE. :cheerleader:

@Rampy: You should go build pages for mobiles too :stars:

soon ..... :bedrime:


You must have mislaid the memo..all mobiles pages are comaptible with ie ;)
Image
We are explorers...We have to Be...To Learn...


Return to “Everything Else”

Who is online

Users browsing this forum: No registered users and 1 guest