- This topic is empty.
Viewing 7 posts - 1 through 7 (of 7 total)
Viewing 7 posts - 1 through 7 (of 7 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
i have written some code in css and html but float is not working. i want the site name and logo at left side and menu or nav at right side
Hi,
Try this:
.homepage {
padding-left: 20px;
float: left;
left: 100px;
position: absolute;
top: 0;
}
nav {
margin: 0 auto;
text-align: right;
float: right;
right: 100px;
position: absolute;
}
Please! – position:absolute
is the worst nuclear option.
The primary issue is :
header * {
display: inline-block;
}
Just remove that and half your problems are solved.
thanks bro
Yes
didn“t see header* inline-block.
but now the problem is that navigation section is table format
If you mean the vertical stack of list items, try display: flex
in your nav ul
or display: inline-block
in your nav ul li
. Whichever suits you best.