Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

basic layout with div instead of table

Tags:

html

css

layout

---------------------------------
menu
---------------------------------|
content                 |Feeds   |
                        |        |
                        |        |
---------------------------------|

I would like to use div to separate content and Feeds that way instead of using a table

I have tried

css.

#left
{
   clear:left;
   float:left;
   position:fixed;
}
#right
{
   float:right;
   position:absolute;
}

html.

<div>
   <div id="left">Content</div>
   <div id="right"> Feeds</div>
</div>
like image 471
Wcs Ase Avatar asked Aug 02 '26 06:08

Wcs Ase


1 Answers

Check this out.

<div id="container">
    <div id="menu">Menu</div>
   <div id="left">Content</div>
   <div id="right"> Feeds</div>
    <div id="footer"> Footer</div>
</div>


body{
    width: 760px;
    margin: 0 auto;
}
#container{
    position:relative;
}
#menu
{
    border: 4px solid orange;
}
#left
{
      float:left;   
}
#right
{
   position:fixed;
    right: 10px;
    top: 25px; /*Change as per your need */            
}
#footer{
    border: 4px solid aqua;
    clear:both;
}
like image 151
Shawn Taylor Avatar answered Aug 03 '26 21:08

Shawn Taylor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!