[HTML/CSS] How would i display these inline?
Code:
<!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>
<title>BN Design</title>
<style>
body {
background-image: url(background.png);
background-repeat: repeat-y;
background-position: center;
width: 540px;
margin: 0px auto;
}
ul#nav li {
display: inline;
padding: 13px;
}
ul#nav li a {
text-decoration: none;
color: #278772;
font-family: Helvetica, Arial;
font-weight: bold;
}
</style>
</head>
<body>
<div id="header">
<img src="BNDlogo.jpg" width="90" height="90" />
<ul id="nav">
<li><a href="#"> HOME </a></li>
<li><a href="#"> PORTFOLIO </a></li>
<li><a href="#"> ABOUT ME </a></li>
<li><a href="#"> CONTACT </a></li>
</ul>
</div>
</body>
</html>
Simple code displaying a logo and a list at the top. The list has been formatted to be displayed horizontally. How would i position them so that the Logo would be on the same line as the list (err.. right next to eachother)?
Thanks
Re: [HTML/CSS] How would i display these inline?
I don't understand, Screenie or demo pls.
Re: [HTML/CSS] How would i display these inline?
http://i51.tinypic.com/317cvom.jpg
The Logo (contained in an IMG obviously) and the navbar (contained in a ul) are both in block-level elements, so when they start, they break, and start on a new line.
What can i use to position the navbar and the logo inline and right next to eachother?
I know i could use "display: inline;" but where would i put that, and also, i would like the navbar to be a little bit higher (in the middle) so normally i would add some bottom padding, but i can't do that with inline text, so what should i do?
Re: [HTML/CSS] How would i display these inline?
<img src="image.gif" align=middle><menushit>
Re: [HTML/CSS] How would i display these inline?
you can do it through css. im using my phone but you need to use float: left; as part of the code
Re: [HTML/CSS] How would i display these inline?
Yeah but he had a previous thread about using html tags, so i gave him an equivalent of it in a tag.