css - Proper way to use divs to align divisions of web page on left or right side -
i getting web development project , trying learn how setup divs elements left aligned , others right aligned. many moons ago before 's around use table , set alignment of cells can't seem find equivalent div's.
in below html code trying make text "my brand" on left , "link 1" , "link 2" blocks of text on right. 3 blocks of text should on same line , vertically aligned.
<html> <head> <title>hi mom</title> <style> .header { background-color:#bfefff; height:50px; } .tagline { color: #00a5d8; font-size: 20pt; font-family: helvetica neue; font-weight: bold; vertical-align: middle; text-indent: 20pt; display: inline; } body { margin:0px; } </style> </head> <body > <div class="header"><div class="tagline"><p>my brand</p></div><div class="tagline"><p>link 1</p></div><div class="tagline"><p>link 2</p></div></div> <div><center> blah blah </center></div> </body> </html>
thanks
html
<div class="header"><div class="tagline1"><p >my brand</p></div><div class="tagline"><p>link 2</p></div><div class="tagline"><p>link 1</p></div></div> <div><center> blah blah </center></div>
css
.header { background-color:#bfefff; height:50px; } .tagline { color: #00a5d8; font-size: 20pt; font-family: helvetica neue; font-weight: bold; vertical-align: middle; text-indent: 20pt; display: inline; float:right; width:300px; } .tagline1 { color: #00a5d8; font-size: 20pt; font-family: helvetica neue; font-weight: bold; vertical-align: middle; text-indent: 20pt; display: inline; float:left; width:300px; } body { margin:0px; overflow:hidden; }
Comments
Post a Comment