Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 1463 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     HTML/XHTML/DHTML/CSS :

Help Noobie Help

Thread title: Help Noobie Help
Closed Thread  
Page 1 of 2 1 2 >
    Thread tools Search this thread Display Modes  
04-02-2007, 04:08 PM
#1
Mizan is offline Mizan
Mizan's Avatar
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
 
Posts: 299
iTrader: 0 / 0%
 

Mizan is on a distinguished road

Send a message via AIM to Mizan Send a message via MSN to Mizan

  Old  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
Vizon is offline Vizon - Click for my Image
Status: R'tard
Join date: Jan 2007
Location: USA
Expertise:
Software:
 
Posts: 2,959
iTrader: 21 / 100%
 

Vizon is an unknown quantity at this point

  Old

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
Steven Fergus is offline Steven Fergus
Status: Hey, I'm Steven
Join date: Feb 2007
Location:
Expertise:
Software:
 
Posts: 1,212
iTrader: 3 / 100%
 

Steven Fergus is on a distinguished road

  Old

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
Code:
float:left;
this allows another div to 'float' (or sit next to the) left of it.

Hope this helps.

04-02-2007, 05:00 PM
#4
Vizon is offline Vizon - Click for my Image
Status: R'tard
Join date: Jan 2007
Location: USA
Expertise:
Software:
 
Posts: 2,959
iTrader: 21 / 100%
 

Vizon is an unknown quantity at this point

  Old

You probably need a container too...

04-02-2007, 07:20 PM
#5
Mizan is offline Mizan
Mizan's Avatar
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
 
Posts: 299
iTrader: 0 / 0%
 

Mizan is on a distinguished road

Send a message via AIM to Mizan Send a message via MSN to Mizan

  Old

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
daz is offline daz
Status: I love this place
Join date: Jun 2005
Location: UK
Expertise:
Software:
 
Posts: 562
iTrader: 5 / 100%
 

daz is on a distinguished road

Send a message via MSN to daz

  Old

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
Mizan is offline Mizan
Mizan's Avatar
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
 
Posts: 299
iTrader: 0 / 0%
 

Mizan is on a distinguished road

Send a message via AIM to Mizan Send a message via MSN to Mizan

  Old

Can you give me an example of using a container in my CSS?

04-02-2007, 08:32 PM
#8
Steven Fergus is offline Steven Fergus
Status: Hey, I'm Steven
Join date: Feb 2007
Location:
Expertise:
Software:
 
Posts: 1,212
iTrader: 3 / 100%
 

Steven Fergus is on a distinguished road

  Old

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
Vizon is offline Vizon - Click for my Image
Status: R'tard
Join date: Jan 2007
Location: USA
Expertise:
Software:
 
Posts: 2,959
iTrader: 21 / 100%
 

Vizon is an unknown quantity at this point

  Old

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
Mizan is offline Mizan
Mizan's Avatar
Status: Member
Join date: Jul 2006
Location: Bronx, NY
Expertise:
Software:
 
Posts: 299
iTrader: 0 / 0%
 

Mizan is on a distinguished road

Send a message via AIM to Mizan Send a message via MSN to Mizan

  Old

ah yes. But whats the width supposed to do? does it change alll the width in the wrapper?

Closed Thread  
Page 1 of 2 1 2 >


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed