[Guide] Basic PHP

Hello , someone has a html form of a basic web to study please?

thanks a lot :D
 
I read a lot, I've also seen many examples and have practiced .

but even I can not understand the box model to shape my page because the div are misaligned and although I put the position property : o float: I can not align and give the way I want LOL
 
I read a lot, I've also seen many examples and have practiced .

but even I can not understand the box model to shape my page because the div are misaligned and although I put the position property : o float: I can not align and give the way I want LOL

That is html and css side not php. You need to read and that.
 
  • Like
Reactions: VISITOR
here is an example:

CSS:
Code:
.left{
display:inline-block;
float: left;
}
.right{
display:inline-block;
float:right;
}
.clearfix{
clear:both;
}
this is the css part also you need to give them a width
Code:
#main_body{
width: 640px;
}
.col-1{
width: 200px;
padding:10px;
}
.col-2{
width: 400px;
padding:10px;
}
and the HTML part

Code:
<div id="main_body">
<div class="col-1 left">
qweqwewqeq
</div>
<div class="col-2 right">
wqeqweqwe
</div>

<div class="clearfix"></div>
</div>

the .clearfix div has to be after the floated elements
 
  • Like
Reactions: bustini
Cool MeMos give us a nice example. How it should look like if you are starting from zero. But in case you are editing an existing page the things are a bit different. Cause sometimes if you have missed some general <div> Tag you may not be able positioning as you like
It's important to take a look on the hole html to find those tags and see/edit their styling if need so.
It's simple to think that the div tag is a block and then you can insert many blocks into this one. Easy example:
Your main div is with width=300px, and height=300px,
And if You want to insert another block inside this block with bigger size the main block and to stay in left side it's impossible. Unless you edit the height of the main block with different size or set different position:absolute or fixed for the second block.
So it's more complicated if you are trying to edit existing web, you have to pay more attention on hole web. But this is the best way start learning.
 
Last edited:
  • Like
Reactions: bustini

Similar threads