html - I can't place objects in div's in the same line -
html - I can't place objects in div's in the same line -
here html code work on.
<div id="menu"> <center> <div style="list-style: none; class:" menu "> <div style="display: inline "><a href="indeks.html " class="button ">home</a> </div> <div style="display: inline "><a href="indeks.html " class="button ">repertuar</a> </div> </div> </center> </div>
and here css part
#menu { margin:20px; display: inline-block; padding: 20px; text-align: right; } .button { display : block; background: #ff0080; background: -webkit-linear-gradient(top, #ff0080, #ffb248); height: 50pxx; width : 100px; margin: 0; padding: 0; border : 2px solid rgba(33, 68, 72, 0.59); text-decoration: none; }
i tried literaly lots of ways, searched loads of tutorials, , digged in sites source codes reason 2 buttons made display 1 under instead of beingness next eachother.
im trying create menu, , seems screwed something, , cant find (problems of learning in other language own).
you screwed html :)
replace
<div style="list-style: none; class:"menu"> <!-- wrong -->
with:
<div style="list-style: none;" class="menu"> <!-- right -->
and also: don't utilize center
tag deprecated.
to buttons on same line, utilize display: inline-block
instead of display: inline
avoid using inline styling using css classes. helps maintain css code in structure.
working fiddle
html css
Comments
Post a Comment