How do you make bars, so that the main part of it is repeating and you have rounded corners?
I know how to repeat the image in CSS, and have everything working. I just can't figure out how to add rounded corners to it.
Here's a pic that might help explain what I mean:
View attachment 77135
use an unordered list and just have your rounded corners before and after the list...?
<div id="navigation">
<ul id="menu">
<li><a href="Link">Link</a></li>
</ul>
</div>
#navleft {
background: url(files/navleft.jpg) repeat-x;
width: 62%;
height: 28px;
float: left;}
/* UL Files here */
use an unordered list and just have your rounded corners before and after the list...?
Read the tutorial. The article describes a general CSS technique and happens to use it in a navbar.
Figure it out. Worth learning.
<!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>
<style>
#menu {
background: url(files/navleft.jpg) repeat-x;
width: 62%;
height: 28px;
float: left;}
</style>
<style type="text/css">
<!--
#menu li {
list-style-type: none;
display: inline;
margin: 0px;
height: 30px;
width: 100px;
}
#menu a, #menu a:link {
background: url(images/buttons.gif);
background-repeat: no-repeat;
color: #000;
font: bold 12px/22px tahoma, verdana, arial, sans-serif;
text-decoration: none;
height: 30px;
width: 100px;
}
#menu a:hover {
background: url(images/buttons_rollover.gif);
background-position: 0px -30px;
}
-->
</style>
</head>
<body>
<div id="menu" style="height: 30px;">
<nobr><img src="lhscorner.jpg" height="25"/>
<li><a href="#"> Home </a></li>
<li><a href="#"> Registration </a></li>
<li><a href="#"> Information </a></li>
</div><img src="rhscorner.jpg" height="30"/><nobr>
</body>
</html>
.bar {
...
}
.bar h3 {
...
}
<div class="bar">
<h3>Today's Top Stories</h3>
</div>
That code is NASTY, yagran, sorry. The point of CSS/XHTML based designs is to simplify code, esp. for debugging and reading purposes.
That's why the pros use Sliding Doors. It's just 2 CSS definitions and nested tags, like so:
Your code is anything but simple. Anyway, that's a freebie for monke, I guess. I was hoping he'd figure it out based on the article.
<div id="navigation">
<div id="navleft">
<ul id="left">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul><!--ul#left-->
</div><!--#navleft -->
<div id="navright">
<ul id="right">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul><!--ul#right-->
</div><!--#navright-->
</div><!--#navigation-->
#navigation {
text-align: center;
margin-top: 15px;
height: 28px;
width: 100%;
}
#navleft {
background: url(files/navleft.jpg) repeat-x;
width: 62%;
height: 28px;
float: left;
}
#navleft ul {
list-style: none;
margin: 0;
padding: 0;
}
#navleft ul a {
color: #ffffff;
font: 13px "Lucida Grande", Verdana, sans-serif;
text-shadow: #04256f 0px 1px 0px;
display: block;
}
#navleft ul a:hover {
color: #2299d7;
}
#navleft ul li {
float: left;
padding-left: 2.25em;
}
#navleft ul#left {
float: left;
margin: 5px 0px 0px 15px;
display: inline;
}
#navright {
background: url(files/navright.jpg) repeat-x;
width: 25%;
height: 28px;
float: right;
clear: right;
}
#navright ul {
list-style: none;
}
#navright ul a {
color: #ffffff;
font: 13px "Lucida Grande", Verdana, sans-serif;
text-shadow: #6f0404 0px 1px 0px;
}
#navright ul a:hover {
color: #e23838;
}
#navright ul li {
float: left;
padding-left: 2.25em;
}
#navright ul#right {
float: left;
margin: 5px 0px 0px 15px;
display: inline;
}