ClioSport.net

Register a free account today to become a member!
Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

.CSS, Div, ID & Class Help!



mas

  MK7 GTD & Mini GP
Please see link, hope I have made sense.

5199661503_9ea8867886.jpg

HELP-01 by Stickars, on Flickr
 
class = more than 1
id = unique


it depends how you do it, if you are specifying location, or just using other code to structure it!
you could have basic code which styles the div, so for example #container, and then just position it under each other,

i can't really explain it without seeing how you're going to be doing it, but check out what im currently doing at the moment; jsbhosting.com - for uni, pretty much all css-based :)

any q's send us a pm, but check the source on that, may help you out as i've done something similar with the sidebar!
 

mas

  MK7 GTD & Mini GP
Yeah, thats the problem, I am positioning the Divs aswell with px or %.

So, lets say... my first background shadow is called ".BGBot", it is styled and positioned on the main page to be 540px from the top.

On the next page, I dont want it to be in the same place, still centered but further down... if I didnt share the .css it would be okay as my HTML would all be ready off there own style sheets with their own individual position. But, I want it to be all running off one main.css? If I didnt, there would be mega ammounts of css over each page.
 
  MKV R32
Using your <body> tag on your hrml page, add an id tag. Now it might look like this:
<body id=”page_2″>
In your CSS file, add
.body#page_2 {
your parameters and settings
}
 
  LY 182
Just on my iPhone bud.

Why don't you just have .class1 and .class2 using the same values but different positionng?
 

mas

  MK7 GTD & Mini GP
That is the way I can do it,

But, on each page, the bottom background will appear at different levels on every single page doe to the ammount of content on each one. If you get me? LOL.

My css file will be like .class .class1 .class2. class3. class4 .class5 .class6 .class7 .class8 etc... etc... I dont want to have a shed load of different classes or ID's, purely down to the management of them.
 
  172
You don't need to set the position of the background div. The content above it will dictate where it appears.

HTML:
<div id="content">blah blah blah</div>
<div id="footer></div>"

HTML:
#content { [style info here] }
#footer { background: url(/path/to/image.jpg); height:[height for footer div];clear:both;}

Obviously, that's only the basics and needs building up.
 


Top