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.
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)
Last edited by Chippiewill; 07-10-2007 at 01:05 PM. Reason: Missed a bit of coding
Chippiewill.
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>
Loads of coding errors. For a start with DIV's why the hell use align="" in it? Thats what the float element is for.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)
so what tut shall I use and how is thise coduing the layout :S
Sos am a newb at coding
What a load of crap! Why the hell would you use align="" and why the hell have you got all that junk that isn't needed?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)
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 advancedBut on this forum, I feel a noob :p
Want to hide these adverts? Register an account for free!