Forum Moderators: not2easy
I'm new to this forum and also fairly new to the world of css - so please bear with me :)
I create websites using seperate divs to put my content in. I've always wondered if it's possible to group multiple divs so they can be repeated further on down the page?I'm kind of bored with coding up the same div but in a different position.
Is it a case of placing them within another div? If so how is this done?
I hope I haven't opened one hefty can of worms!
Cheers.
not entirely sure i understand the question though...
I create websites using seperate divs to put my content in.got that part.
I've always wondered if it's possible to group multiple divsyes...
they can be repeated further on down the page?
I'm kind of bored with coding up the same div but in a different positionthis to me sounds like you are using inline styles and not a stylesheet?
if you are using the same div in different positions i would imagine your page looking somethign like:
<div id="old-faithful" style="float:left; height:100px; width:500px; .......">content here</div>
<div id="old-faithful" style="float:right; height:100px; width:500px; .......">content here</div>
just repeating the same DIV as you mention, just in a different position....
are you using a stylesheet? i.e. style.css
Also, in the body of my page I would use <div class="old-fathful" instead of <div id="old-faithful". Am I not doing it correctly?
I guess what i'd like to do is repeat the divs further on down the page but without constantly coding up new ones in my <style> specifying the position of them - just re using the same one again.
I'm confusing myself now ha ha! The problem is i'm self taught so i'm blagging it a bit. Would be awesome if you could set me straight tho!
Cheers.