html css පොඩි උදව්වක් ඕන :(

upul333

Member
Jun 9, 2017
1
0
0
html css පොඩි උදව්වක් ඕන :(

මචං මට මේ පහල තියෙන code එකේ logo එක float කරගන්න ඕන ! එත් මං try කරා හරියන්නේ නැනේ :(

<header>
<h1>Welcome To the WORLD</h1>
<h2>zzzzzzzzzzzzzzzzzzzzzz</h2>
<img src="zz/zzz.jpg" alt="logo" id="logo" />
</header>

css-

body {
font-family: philosopherregular;
font-size: 20px;
letter-spacing: 0.1em;


}

h1 {
font-family: barrioregular;
display: inline-block;
margin-left: 200px;

}

h2 {
font-family: barrioregular;
display: inline-block;


}
#logo{
width: 100px;
float: left;
display: inline-block;


}
සරලව කිවොත් මෙන්න මේ විදිහට
dddd_5.jpg
 
Last edited:

potatotharaka

Member
Jan 11, 2017
306
12
0
<header>
<img src="zz/zzz.jpg" alt="logo" id="logo" />
<h1>Welcome To the WORLD</h1>
<h2>zzzzzzzzzzzzzzzzzzzzzz</h2>
</header>
 

DemonAkalanka

Well-known member
  • Aug 17, 2011
    7,577
    1,458
    113
    Sri Lanka
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <img src="1.png" width="300" style="display:block; float:left; clear:both; margin-right:10px; margin-bottom:10px;" />Spider Man<br />Bat man
    </body>
    </html>
     

    potatotharaka

    Member
    Jan 11, 2017
    306
    12
    0
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>

    <body>
    <img src="1.png" width="300" style="display:block; float:left; clear:both; margin-right:10px; margin-bottom:10px;" />Spider Man<br />Bat man
    </body>
    </html>

    how old are you machan? over 30, 35?
     

    sajith.xp.pk

    Well-known member
  • Nov 12, 2008
    6,097
    4,221
    113
    Sri Lanka
    Machan oka ohoma be.

    Mulin div ekak daala e div eka asse div 2 k daala e div deka float left karala width eka hadapan ona widihata. Passe left div ekata logo eka daapan. Thats the way. Try it.
     

    SaNDun

    Well-known member
  • May 4, 2006
    12,690
    838
    113
    In La Srinka
    HTML:
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>Untitled Document</title>
    
    <style type="text/css">
    body {
    font-family: philosopherregular;
    font-size: 20px;
    letter-spacing: 0.1em;
    }
    
    h1 {
    font-family: barrioregular;
    display: inline-block;
    border:1px solid #FF0000;
    margin-top:0px;
    }
    
    h2 {
    font-family: barrioregular;
    display: inline-block;
    margin-top:0px;
    height:50px;
    }
    
    #logo {
    width: 100px;
    height:100px;
    float: left;
    display: inline-block;
    }
    </style>
    
    </head>
    
    <body>
    
    <header>
    <img src="zz/zzz.jpg" alt="logo" id="logo" />
    <div style="height:50px;"><h1>Welcome To the WORLD</h1></div>
    <div style="height:50px;"><h2>zzzzzzzzzzzzzzzzzzzzzz</h2></div>
    </header>
    
    </body>
    </html>