Ok i can code in iFrames and expandbles but people now seem to use DIVS what is it and is their and tuts for it.
Printable View
Ok i can code in iFrames and expandbles but people now seem to use DIVS what is it and is their and tuts for it.
Divs are really easy tbh and far better than tables
Example one:
Example 2:HTML Code:<div id="text" style="position:absolute;left:48px;top:328px;width:150px;height:50px;z-index:2" align="left">
You can position text anywhere on the page!
</div>
Both would produce the same (I think) but one the location is stored in CSS and the other (actually i think its still css) in the actual div. Alignment (I think) must be in the div (not confirmed)HTML Code:<style type="text/css">
#text {
position:absolute;
left:48px;
top:328px;
width:150px;
height:50px;
z-index:2;
}
</style>
<body>
<div id="text" align="left">You can position text anywhere on the page! </div>
ps there are proably coding errors (aswell as spelling)
If your coding with divs then you'll need CSS knowledge , you set everythign up with css like the size and positioning then you do your div tag and write the html init , This is a basic code for a simple layout with just a banner and main content area.
Just study the codes of sites with divs on and you'll get the drift.PHP Code:<html>
<head>
<title>Sitename</title>
<style type="text/css">
<!--
body {
margin: 0px;
padding: 0px;
}
#header {
background-image: url(http://) ;
width: 100%;
height: 50px;
}
#content {
background: #6495ED;
width: 100%;
height: 500px;
text-align:center;
}
-->
</style>
</head>
<body>
<div id="header"><img src="http://bannerimage"></div>
<div id="content">Content</div>
</body>
</html>
so what tut shall I use and how is thise coduing the layout :S
Sos am a newb at coding
And, why are you using position absolute. It's the worst thing to code a WHOLE layout in.
hehe were learning how to do this at college, im the only who who knows about css apart from the tutor and for once I feel advanced xD But on this forum, I feel a noob :p
i would use divs buh the thing i dont get is how do you make like the background thingy, like on tables its <td background="url.gif" and i have no idea how it works on divs :D
or if you want the image to repeat:
background-image: url('urltoimage.gif') repeat; (both ways)
background-image: url('urltoimage.gif') repeat-x; (horizontal)
background-image: url('urltoimage.gif') repeat-y; (vertical)
Whats with the wasting of code "background-image" how cheap can this get:
Code:
background: url(path) repeat-x;
Or you dont even need to put a repeat for it to repeat both ways.