Having Some Problems

AlchemicFlux

New Member
So I've been doing websites since I was in middle school, using free subdomains (bravehost.com), and mostly out of boredom. I recently decided with the push from some people, to try and expand my knowledge and make a few extra $$$ on the side.

However, things seem to have changed since the last time I did this, lol. I'm so used to using HTML, and it's all I ever used, I started to convert to CSS (I'm a bit behind, I know, Old School!). I really dig it, and I've got my own little notebook filled with different inputs and what have you, and I've been testing it out on my own site.

The problem I'm having is inserting external style sheets. I'm not sure if the problem lies in the (link) reference I'm using, or if I managed to mess up the Style Sheet itself. Everywhere I look online shows me the basic 'linking to your site', and I got so frustrated I copy-pasted and put my info in the right spots, and have gone over my Style Sheet multiple times.

I started with something simple to dabble with, just the background color and image, and image alignment. It never shows up on my website. Everything is still white, there's no image, and it's starting to frustrate me.

There has to be a step I'm missing, that has to be some...n00b knowledge and nobody feels the need to include it in their tutorials because it's kind of a common sense thing. I'm missing it!

I've included the link to my Style Sheet, the one I want to link to my actual site. Am I missing some stupid fundamental thing?

Style Sheet

Thanks a lot you guys, and I'm sorry if this is ridiculously stupid, but it's driving me nuts.
 

Phreaddee

Super Moderator
Staff member
Code:
<head>     
<style>       
{background-color:#000000;          
background-image:url ('chemistry_00343472.jpg');           
background-repeat: no repeat;        
 background-position: right-top;}
yeah #1 you've got html in your css file so it's already broken.
and #2 you've got to choose a selector at the moment its just random styles not applied to anything.
#3 you haven't even attempted to link from your html.
HTML:
<html> 
<head> 
Hey everybody  
</head> 
</html>
and your html file is completely all wrong. where is your <body>
and you need a doctype and a charset and a title and the link to your css

HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Webpage title</title>
<link rel=stylesheet" href="/Background.css">
</head>
<body>
Hey Everybody
</body>
</html>
that's pretty fundamental.
 
Last edited:

amalayer

New Member
Code:
<head>     
<style>       
{background-color:#000000;          
background-image:url ('chemistry_00343472.jpg');           
background-repeat: no repeat;        
 background-position: right-top;}
yeah #1 you've got html in your css file so it's already broken.
and #2 you've got to choose a selector at the moment its just random styles not applied to anything.
#3 you haven't even attempted to link from your html.
HTML:
<html> 
<head> 
Hey everybody  
</head> 
</html>
and your html file is completely all wrong. where is your <body>
and you need a doctype and a charset and a title and the link to your css

HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Webpage title</title>
<link rel=stylesheet" href="/Background.css">
</head>
<body>
Hey Everybody
</body>
</html>
that's pretty fundamental.


Well stated. Check your HTML first and if you've linked it well on the body.
 

Edge

Member
Well thanks for that insight Amalayer. Without you telling me Phreadee was right I didn't know.
 
Top