Jump to content

A Sample Style Sheet


bigjoe11a
 Share

Recommended Posts

I can I ask any one that knows css to make me up a small sample of a style sheet. None of the samples I fount work. I wanted some thing like this <header><leftnav><content><rightnav><footer> Please color each of the back grounds.ThanksJoe

Link to comment
Share on other sites

what have you tried? Wouldn't it be more beneficial to learn why your implementation is wrong? The basic selectors in CSS are pretty easy to follow, there are id's => #, classes => ., and tag selecters => div, p, a, etc, to get you going so if you have an element with an Id, you use the #

<div id="header"></div> #header{  width: 200px;  height: 25px;  background-color: #020202;};

so if you have an element with a class, you use the .

<div class="column"></div> .column{  width: 200px;  height: 400px;  background-color: #efefefe;};

or just to target elements

<ul>  <li>item 1</li>  <li>item 2</li>  <li>item 3</li></ul> li{  float : left;  color: red;};

http://www.w3schools.com/css/css_id_class.asp

  • Like 1
Link to comment
Share on other sites

CSS:
#header{width:100%; height:120px} #leftnav{width:20%; height:700px; float:left} #content{width:50%; height:700px} #rightnav{width:20%; height:700px; float:right} #footer{width:100%; height:120px; clear:both}

Do I use a div for this or ?
Link to comment
Share on other sites

HTML:
<div id="header"></div><div id="leftnav"></div><div id="rightnav"></div><div id="content"></div><div id="footer"></div> 

Ok, but can you add some style to it. and change the back ground color so I can see what you did.
Link to comment
Share on other sites

what have you tried? Wouldn't it be more beneficial to learn why your implementation is wrong? The basic selectors in CSS are pretty easy to follow, there are id's => #, classes => ., and tag selecters => div, p, a, etc, to get you going so if you have an element with an Id, you use the #
<div id="header"></div> #header{  width: 200px;  height: 25px;  background-color: #020202;};

so if you have an element with a class, you use the .

<div class="column"></div> .column{  width: 200px;  height: 400px;  background-color: #efefefe;};

or just to target elements

<ul>  <li>item 1</li>  <li>item 2</li>  <li>item 3</li></ul> li{  float : left;  color: red;};

http://www.w3schools...ss_id_class.asp

You have the header and column, Your didn't add the left and right nav and a footer. Please make it simple as possible
Link to comment
Share on other sites

CSS:
 #header{width:100%; height:120px} #leftnav{width:20%; height:700px; float:left} #content{width:50%; height:700px} #rightnav{width:20%; height:700px; float:right} #footer{width:100%; height:120px; clear:both} 

Well all most what I wanted. I thought you mite want to take a look. http://toppersbbs.dtdns.net/mapnet/blog.phpstyle sheets are hard to work with. How ever that is close to what I wanted.
Link to comment
Share on other sites

It's like I said in another post. I just don't under stand css or how to use more of the css styles and crap like that. Some of what I do know I learned from watching the videos on youtube. How ever they all ways don't teach things I want to know

Link to comment
Share on other sites

You have the header and column, Your didn't add the left and right nav and a footer. Please make it simple as possible
That was intentional. The idea was to try and figure out what you can and can't get. CSS is not that hard, but we're here to help, not do it for you. Like I said, knowing what you tried and what about it was difficult for you is what's more important, so we can actually answer your questions and clear up your confusion. Giving you the insight to figure it out for next time should be the focus, not just for the immediacy of right now.
  • Like 1
Link to comment
Share on other sites

ok, maybe your not under standing, Look at the sample that eTianbun gave me. Now look at this.http://toppersbbs.dtdns.net/mapnet/blog.php I took the security off of it so you can see it. See the problem is that I all ways have had was liniing things up on my page. Well w3schools doesn't have a tutorial that I can under stand. The tutorials may be made for beginniners. How ever they were made by pro's. so look at the link. You see how it all lines up and it's all most in the center. Well from his sample I was able to create that and add it too my page. Thanks eTianbun for that samples

Link to comment
Share on other sites

Even if you don't understand the tutorial, which I find hard to believe, thescientist gave you numerous examples and implementations for you to learn how to do what you want to do.It's much better for everybody if you just learned how to properly use CSS. Then you wouldn't have to create a thread and just ask for the code, which many people here don't like to outright give, since that defeats the purpose of w3schools. Besides, you'll just be coming back again later with another thread asking how to do X, and the process would repeat itself. It'd be much faster for you in the long run not having to wait for responses and sifting through all of the "learn it" posts, don't you think?I didn't understand CSS myself until I read the tutorials and learned it by really just messing around and seeing for myself what certain things do. Trial and error. You're not expected to memorize everything, that's why we have a reference.

Link to comment
Share on other sites

Like I said, you can under stand the tutorials. I can't all ways under stand what I'm reading and I'm sorry. That's the way life is.How do you think I been picking up on PHP and Classes. By watching the video tutorials. The only differance is that the videos show me. Where in turn w3schools tutorials just tell me. Theres no one to explain it or tell me what this means otr any thing like that. Does that help you to under stand.

Link to comment
Share on other sites

Have you thought of going to an institution to learn? We can only teach you through text on the forums. In the business world, you either learn to do something yourself or you pay somebody to do it. Often you even have to pay to be taught but we teach for free on these forums.

Link to comment
Share on other sites

yes, I have and they cost too much and don't want to teach me what I need to know. and there are 1000's tutorials and well made too. It's just you can't expect every one to learn off them

Link to comment
Share on other sites

even still, i had asked at least a couple of times for you to show/explain what you had and what you didn't understand about it, as an opportunity for you to try and learn. You'll always learn more from your mistakes.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...