I haven't started this website yet, but I want to make a website that when a user clicks on a link (set up at the top of the page, like tabs), I want it to expand from roughly 100px to 200 or 250px - does that make sense? I have no idea how to code that, or what to search on Google for, to figure it out. I know how to set up tab links like on this website (CSS-Tricks - look at the top of this page), but I just don't know how I would expand them.
I suppose you could do that with some form of jquery, it really depends on what you're trying to accomplish though.
Are you expanding in one direction (ie, width or height) or multiple directions (ie, width AND height)? Would the content within the tab be replaced with something else?
Always think about usability as well. Is this something that the average user going to the site is going to even understand?
I only want it to expand horizontally roughly by 100 pixels just to emphasize that they are in that "tab". The text will be the same within the link tab, but I just want it to expand horizontally. It is a more design emphasized website, so they do need this feature. Does that help?
I loved your reply - super simply and awesome funny - thanks for the help :)
Now for another question...
I am currently working on the following site: meandmyback.com/linearstars and I'm having issues with just aligning the "|" pieces in the middle of my link areas. I just barely started on it, but if you could help me out, that would be great. Here's the HTML and CSS for it so far:
<!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>Linear Stars - Home Page</title> <link href=\"stylesheets/main-style.css\" rel=\"stylesheet\" type=\"text/css\" /> </head> <body> <div id=\"align\" /> <div id=\"container\"> <div id=\"header\"> <img style=\"float:left\" src=\"images/left-gray.gif\" alt=\"\" /> <img class=\"header\" src=\"images/linearstars-header.gif\" alt=\"Introducing the most innovative and customizable linear lighting solutions for cabinet, furniture and display lighting.\" title=\"linearstars\" /> </div> <div id=\"nav\"> <img src=\"images/nav/home-white.gif\" alt=\"home\" title=\"home\" /><img class=\"black\" src=\"images/nav/products.gif\" alt=\"products\" title=\"home\" />|<img class=\"black\" src=\"images/nav/pictures.gif\" alt=\"pictures\" title=\"pictures\" />|<img class=\"black\" src=\"images/nav/pricing.gif\" alt=\"pricing\" title=\"pricing\" />|<img class=\"black\" src=\"images/nav/customization.gif\" alt=\"customization\" title=\"customization\" />|<img class=\"black\" src=\"images/nav/contactus.gif\" alt=\"contact us\" title=\"contact us\" /> </div> </div><!--THIS IS THE END OF THE CONTAINER, AND THUS THE END OF THIS PAGE--> </div> </body> </html>
and now the CSS:
font { font:Arial, Helvetica, sans-serif;} body {background:#FFF;}
I am currently working on the following site: meandmyback.com/linearstars and I'm having issues with just aligning the "|" pieces in the middle of my link areas.
That's because you have:
.black { margin:0 5px 12px; }
So the links, which are .black, get pushed up, while the "|" (pipes) don't get pushed up because they are not .black. I would recommend instead of using pipes in your HTML, use 1px border to keep the border right next to your links.
Please help!
Are you expanding in one direction (ie, width or height) or multiple directions (ie, width AND height)? Would the content within the tab be replaced with something else?
Always think about usability as well. Is this something that the average user going to the site is going to even understand?
I only want it to expand horizontally roughly by 100 pixels just to emphasize that they are in that "tab". The text will be the same within the link tab, but I just want it to expand horizontally. It is a more design emphasized website, so they do need this feature. Does that help?
That's easily done with CSS.
<ul>
<li>About</li>
<li>Something Else</li>
<li class="current">Oh Snap, Current</li>
<li>One More</li>
</ul>
Now for another question...
I am currently working on the following site: meandmyback.com/linearstars and I'm having issues with just aligning the "|" pieces in the middle of my link areas. I just barely started on it, but if you could help me out, that would be great. Here's the HTML and CSS for it so far:
and now the CSS:
font { font:Arial, Helvetica, sans-serif;}
body {background:#FFF;}
#align {background: url(../images/shadow.gif); width:1126px; background-repeat:repeat-y; margin:50px auto;}
#container {width: 1024px; height:640px; margin:50px auto; background:#FFF; border: solid 1px #666;}
#header {float: left; }
#nav {float:right; margin:0px 0px 0px 35px;}
.left {float:left;}
.header {float:left; margin: 25px 25px;}
.clear {clear:both;}
.black {margin:0px 5px 12px 5px;}
That's because you have:
.black {margin:0 5px 12px;
}
So the links, which are .black, get pushed up, while the "|" (pipes) don't get pushed up because they are not .black. I would recommend instead of using pipes in your HTML, use 1px border to keep the border right next to your links.
.black {margin:0 5px 12px;
border-left: 1px solid #000;
}