|
|
|
|
Thread title: Help Noobie Help |
|
|
|
|
|
Thread tools
Search this thread
Display Modes
|
|
04-02-2007, 04:08 PM
|
#1
|
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
Posts: 299
|
Help Noobie Help
Help. Im new to CSS and HTML, i already know the basics, and now have moved onto coding my own site. Right now, im trying to code this layout i made, but its just not working so far.
here's the CSS code:
Code:
.body {
background: url(images/bg.gif);
font-family: arial, verdana, tahoma, sans-serif;
font-size: 13px;
color: #333333;
}
.content {
background: url(images/content.gif);
height: 503px;
width: auto;
}
Im trying to make the content get on top of the bg, but its not working. im also trying to make it fluid.
Here's the HTML:
Code:
<head>
<title>ValKros The Best Design Ever</title>
<link href="global.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="body">
<div class="content"></div>
</div>
</body>
</html>
Thank You. If you dont understand what i mean, ask, and ill try to sum it up for you. Thank You.
|
|
04-02-2007, 04:37 PM
|
#2
|
Status: R'tard
Join date: Jan 2007
Location: USA
Expertise:
Software:
Posts: 2,959
|
You need to make the classes id's and change the . to # . Just my thoughts, but this shouldn't change what you need help with, I haven't looked into that :O
Nick
|
|
04-02-2007, 04:58 PM
|
#3
|
Status: Hey, I'm Steven
Join date: Feb 2007
Location:
Expertise:
Software:
Posts: 1,212
|
If you are using
Code:
<div class="body"></div>
As the background of the page, you don't need to - Just use
Code:
body {
background: url(images/bg.gif);
font-family: arial, verdana, tahoma, sans-serif;
font-size: 13px;
color: #333333;
}
That will style the body without the need to put in in a div.
So just remove the
Code:
<div class="body"></div>
If you are using [code]<div class="body"></div> as some other background, you need to use positioning; absolute, relative or floats. I myself use floats.
What happens is that a div is a box element, and will automatically place it's self below another div. By using
this allows another div to 'float' (or sit next to the) left of it.
Hope this helps.
|
|
04-02-2007, 05:00 PM
|
#4
|
Status: R'tard
Join date: Jan 2007
Location: USA
Expertise:
Software:
Posts: 2,959
|
You probably need a container too...
|
|
04-02-2007, 07:20 PM
|
#5
|
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
Posts: 299
|
Thanks guys, i'll try it out. And what does the container do actually? alot o people i know use it, but i dont know the purpose.
|
|
04-02-2007, 07:36 PM
|
#6
|
Status: I love this place
Join date: Jun 2005
Location: UK
Expertise:
Software:
Posts: 562
|
Holds all the elements together and gives it a fixed width so it won't change on resize.
|
|
04-02-2007, 07:41 PM
|
#7
|
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
Posts: 299
|
Can you give me an example of using a container in my CSS?
|
|
04-02-2007, 08:32 PM
|
#8
|
Status: Hey, I'm Steven
Join date: Feb 2007
Location:
Expertise:
Software:
Posts: 1,212
|
Code:
HTML
<div id="wrapper">
All your other divs in here
</div>
Code:
CSS
#wrapper {
width:780px; (change to your prefered width)
margin:0 auto; (this gives marign top and bottom 0px; and center aligns it horizontally)
}
|
|
04-02-2007, 10:09 PM
|
#9
|
Status: R'tard
Join date: Jan 2007
Location: USA
Expertise:
Software:
Posts: 2,959
|
He called his a wrapper, but you can call it what you want. In this case he is referring to a container.
|
|
04-03-2007, 02:40 AM
|
#10
|
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
Posts: 299
|
ah yes. But whats the width supposed to do? does it change alll the width in the wrapper?
|
|
|
|
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|