CSS - How Do I Get This <ul> To Stack The Buttons?
I'm trying to get these CSS buttons into a CSS list, but they aren't stacking vertically and I can't seem to remove the bullet (at least, not on FF). Any insight as to how I can get these to appear top to bottom?
http://www.concrete-creative.com/buttons/buttons_list.html the HTML: Code: <div> <ul class-"buttons"> <li class="button1"><a href="#"><span>Gray Buttons</span></a></li> <li class="button6"><a href="#"><span>Orange Button</span></a></li> </ul> </div> the CSS: Code: ul.buttons { list-style-type: none } /* GRAY BUTTON */ li.button1 a { background: transparent url('images/gray_ends.png') no-repeat scroll top right; font-family: Helvetica, Verdana, Arial, sans-serif; color: #000000; display: block; float: left; font: normal 11px arial, sans-serif; height: 22px; margin-right: 6px; padding-right: 8px; /* sliding doors padding */ text-decoration: none; } li.button1 a span { background: transparent url('images/gray_body.png') no-repeat; display: block; line-height: 12px; padding: 5px 0 5px 8px; } li.button1 a:hover { background-position: bottom right; color: #000; outline: none; /* hide dotted outline in Firefox */ } li.button1 a:hover span { background-position: bottom left; } then same CSS for orange button - button6 Similar TutorialsI'm having some trouble adding css code to my div well it works but when i try to copy the div and paste it right under it, it works (pic1) but ones i add the css code (pic2) they both stack on top of each other i used a site that convert psd's to css code thats how i got the code i have 0% css knowledge so i dont even know what my problem is called or else i would Google it so if any one can help or point me in the right direction would be highly appreciated thanks in advanced of course change $ for links to work htt$://i47.tinypic.com/2nuspe9.gif : div_preview_no_css htt$://i47.tinypic.com/28cdr2b.gif : div_preview_with_css htt$://ww$.megaupload.com/?d=LDKDTSHJ : div_code htt$://ww$.megaupload.com/?d=DGTIWKNX : css_code DIV CODE: PHP Code: <div id="tabs"> <div id="albumcoverimg"> <img src="{album_cover_url}" alt="albumcover" /> </div> <div id="titletext"> <p><h2>{artist_name}-{album_name}</h2></p> </div> <div id="descriptiontext"> <p><h3>{short_description}.</h3></p> </div> <ul id="infomenu"> <li>{album_price}</li> <li>Genres:<a href="http://#"><span style="color:#298CDA;">Hip Hop/Rap,</a><a href="http://#"><span style="color:#298CDA;"> Music,</a><a href="http://#"><span style="color:#298CDA;"> Latino</span></a></li> <li>Released: {month day, year}</li> <li><span>℗</span> {year : record_label}</li> </ul> <ul id="previewmenu"> <li><a href="http://#">{track_name}</a></li> <li><a href="http://#">{track_name}</a></li> <li><a href="http://#">{track_name}</a></li> </ul> <ul id="forummenu"> <li style="width:99.75%;"><a href="{forum_article_url}">Discuss in the Community</a></li> </ul> <div> <img src="/images/tabss/toprowimg.gif" alt="toprow" /> </div> <div> <img src="/images/tabss/btmrowimg.gif" alt="btmrow" /> </div> </div> CSS CODE: PHP Code: #infomenu li a, #previewmenu li a { padding-left: 0px; padding-right: 0px; text-decoration: none; width: 100%; display: block; } #previewmenu li, #infomenu li { width: 100%; display: block; margin: 0px; } #btmrowimg, #toprowimg { visibility: visible; position: absolute; left: 6px; z-index: 1; width: 540px; height: 23px; } #descriptiontext p { font: 12px/14px Verdana; margin: 0px; text-align: left; } #previewmenu li a { color: #000000; } #descriptiontext { visibility: visible; position: absolute; left: 212px; top: 96px; z-index: 1; width: 321px; } #forummenu li a { text-decoration: none; color: #000000; height: 100%; display: block; } #albumcoverimg { visibility: visible; position: absolute; left: 14px; top: 16px; z-index: 1; width: 189px; height: 189px; } #infomenu li a { color: #858989; } #forummenu li { height: 100%; display: block; float: left; margin: 0px; } #previewmenu { font: 14px/17px Verdana; margin: 0px; padding: 0px; list-style: none; text-align: left; position: absolute; left: 256px; top: 217px; z-index: 1; width: 284px; } #titletext p { font: 22px/26px Verdana; margin: 0px; text-align: left; } #titletext { visibility: visible; position: absolute; left: 212px; top: 21px; z-index: 1; width: 329px; } #toprowimg { top: 323px; } #forummenu { font: 12px/13px Verdana; height: 13px; text-align: center; margin: 0px; padding: 0px; list-style: none; position: absolute; left: 338px; top: 321px; z-index: 2; width: 202px; } #btmrowimg { top: 373px; } #infomenu { font: 12px/14px "Lucida Sans Typewriter"; margin: 0px; padding: 0px; list-style: none; text-align: left; color: #858989; position: absolute; left: 22px; top: 219px; z-index: 2; width: 190px; } #tabs { margin: 0px auto 0px 0px; width: 547px; } My vertical CSS navigation menu buttons overflow when adding 10 or more buttons. The new buttons end up to the right side of the top buttons. If I change the html format for paragraph format it stops this, but in IE there becomes big space between the buttons. Here is the site: http:// bradleyrose . net / WaterStreetRestaurant I want to get buttons like these with my CSS: http://members.cox.net/npalmi188/test.jpg how do I do this? (don't worry about the color codes) everytime I try to get something near it I get this gay gray extra bevel to my button, anybody know how to fix that? here's the code I was using that had the gray bevel: Code: input.button { font-family: MS Sans Serif; font-weight: none; font-size: 10px; color: #ffffff; background: #4C5844; } I've created navigation buttons in Photoshop by making an 818px wide document, spacing out the words, then slicing them up. My navigation division is 818px wide but when I insert the buttons I created, they don't fit. I do not have any borders around them that I can tell. Why would this happen? http://www.oharenoise.org/new/2009_news_releases.htm Hi, Im trying to style the button tags, mainly to obtain rounded corners, using images. I can't use '<a>' links to style, which would be simpler, as the button is being used for a program written specifically to use button tags. I have the button working in IE 5, 8 and 9 and firefox but other incarnations do not. body { behavior:url( hover.htc ); } Code: /* REQUIRED BUTTON STYLES: */ button { position: relative; color:#000000; border: 0; padding: 0; cursor: pointer; overflow: visible; /* removes extra side padding in IE */ outline: 0; } button::-moz-focus-inner { border: none; /* overrides extra padding in Firefox */ } button span { position: relative; display: block; white-space: nowrap; } @media screen and (-webkit-min-device-pixel-ratio:0) { /* Safari and Google Chrome only - fix margins */ button span { margin-top: -1px; } } /* OPTIONAL BUTTON STYLES for applying custom look and feel: */ button.submitBtn { padding: 0 15px 0 0; margin-right:5px; font: normal 12px Tahoma; color:#000000; text-align: center; background: transparent url(btn_sprite2.gif) no-repeat right -140px; } button.submitBtn span { padding: 3px 0 7px 15px; height:15px; background: transparent url(btn_sprite2.gif) no-repeat left top; color:#000; } button.submitBtn:hover, button.submitBtnHover { /* the redundant class is used to apply the hover state with a script */ background-position: right -210px; } button.submitBtn:hover span, button.submitBtnHover span { background-position: 0 -70px; } button.submitBtn:active, button.submitBtnActive { /* the redundant class is used to apply the hover state with a script */ background-position: right -140px; } button.submitBtn:active span, button.submitBtnActive span { background-position: left top; } Code: <button value="submit" class="submitBtn"><span>Submit</span> The above is the method i have used so far. Does anyone know how i could improve on this, or another method that maybe beneficial? Any help will be appreciated. Cheers. Hi I have built some nav buttons on my site and they looked as I wanted however when i attached links to them a border appeared around the image can someone tell me how to get rid of them please. DYNAMIC WEB DESIGN thankyou in advance. I am using a CSS with my forms, including setting the color and text font for the <INPUT> buttons. However, if the button is disabled, the colors revert to system default. I've tried but can't seem to set the color if the button is disabled. Is it even possible? Thanks, I'm trying to do custom active buttons in a Joomla horizontal menu. But they don't align correctly with the text. I assume it's because the pseudo element with the button is an absolute inside a relative positioned section. The only way I can move it is to fiddle with padding on the relative section. But that fixes some buttons and messes up others. I've tried a lot of other things but they move the whole element and not just that background image. Does anyone know a way to do this? Here's the code: Code: ul.frc-hmenu>li>a { position: absolute; display: block; height: 23px; cursor: pointer; text-decoration: none; color: #4A4A4A; padding:3px 12px; line-height: 23px; text-align: center; } /*change from absolute positioning*/ ul.frc-hmenu>li>a:before, ul.frc-hmenu>li>a:after { position: absolute; display: block; content:' '; top: 0; bottom:0; z-index: -1; overflow: visible; background-image: url('../images/menuitem.png'); } The problem that I am having is that my nav buttons will not show up unless you click on the the space first than they are there. This is the code it is done is html, css and php help would be great thanks.
PHP Code: <?php ?> <html> <head> <title>CSS</title> <style type="text/css"> a.menu , a.menu:link { font-family:Arial, Helvetica, sans-serif; font-weight : bold; font-size:12px; line-height : 30px; text-align : center; text-decoration:none; color : #ffffff; } a.menu:visited { background : url('Images/Untitled-1.png') no-repeat 0% 0%; width: 160; height: 35; color : #ff0000; } a.menu:hover { background : url('Images/Untitled-2.png') no-repeat 0% 0%; color : #ffffff; font-weight : bold; } a.menu:active , body { background : url('Images/Untitled-2.png') repeat; font-weight : bold; line-height : 30px; text-decoration : none; text-align : center; color : #ffffff; } body { background-image : url(Images/brushedmetallighter.jpg); } </style> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head> <body> <table width="199" height="210" border="0" align="left" bordercolor="#666666"> <tr> <td width="187" height="80" align="left" valign="top" background="brushedmetallighter.jpg"> <?php $hostname = "xxxx"; $database = "xxxx"; $username = "xxxx"; $password = "xxxx"; $connpt = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR); mysql_select_db($database, $connpt); $sql = "SELECT * FROM mega ORDER BY productsID"; $result = mysql_query($sql, $connpt) or die(mysql_error()); if (mysql_num_rows($result) < 1) { print "There are no items to display."; } else { while($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $Name = $row['productsName']; $productsID = $row['productsID']; $LeftBanner = $row['LeftBanner']; $BottomBanner1 = $row['BottomBanner1']; $BottomBanner2 = $row['BottomBanner2']; $BottomBanner3 = $row ['BottomBanner3']; $UpperLeftImage = $row ['UpperLeftImage']; $UpperRightImage = $row ['UpperRightImage']; $LowerLeftImage = $row ['LowerLeftImage']; $LowerRightImage = $row ['LowerRightImage']; $Label = $row['Label']; echo "<a href=\"mg_frame3.php?productsID=".$productsID."\"target=\"mainFrame\" class=\"menu\">".$Label."</a> "; } } ?> </td> </tr> <tr> <td height="50" align="left" valign="top" background="brushedmetallighter.jpg"><p><br> <br> </p> </td> </tr> <tr> <td height="71" align="left" valign="top" bordercolor="#000000" background="brushedmetallighter.jpg></td> </tr> </table> </body> </html> So what I want is to have 2 forms with buttons aligned horizontally. <form><input type="submit"></form> <form><input type="submit"></form> They should be like this: [Button 1] [Button 2] But instead, they go like this: [Button 1] [Button 2] And I don't know the CSS for it, so thanks in advance. I am currently working on a project for which I am considering using either Flash or CSS. Basically, what I need to do is draw a button, say a simple circle, on top of another image. Alternatively, I could also use an image of the circle if need be. Either way, what I need to do is be able to position that image in a specific spot over the other image. I was able to get this to work in IE, but not Firefox. Is there a way that I can place the image on top of the other image and keep it relative to the original, larger, image? To give you a better idea of what I'm trying to do, think about putting pointers on a map like google maps. Are there any tutorials or examples of this that anyone can suggest? Brent I have 2 buttons that are not lining up in IE7. I have it working Safari and Firefox on the MAC, but my PC IE browser won't align the buttons. I have tried everything, but no luck. Here's the site: http://www.caillouette.com/Utilitrek/four/ Here's the CSS for the button elements: Code: #bottombox{ clear:both; float:left; display:inline; width:710px; height:61px; margin:0px 0px 0px 0px; } .collectionBig { position: relative; font-family: arial, helvetica, sans-serif; background: url(images/nav/bigBN/collectionBig_on.gif) no-repeat; display: inline; width: 271px; height: 61px; margin: 0 0 0 0px; padding: 0; } .collectionBig a { background: url(images/nav/bigBN/collectionBig_on.gif) no-repeat; display: inline; color: #000000; font-size: 11px; width: 271px; height: 61px; float: left; color: black; text-decoration: none; } .collectionBig img { width: 271px; height: 61px; border: 0; background: url(images/nav/bigBN/collectionBig_on.gif) no-repeat; } * html a:hover { visibility:visible; } a:hover img { visibility:hidden; } .memberBig { float:right; position: absolute; top:0; margin-right:5px; font-family: arial, helvetica, sans-serif; background: url(images/nav/bigBN/membershipBig_on.gif) no-repeat; /* white-space: wrap; */ display: inline; width: 414px; height: 61px; padding: 0 0 0 0; } .memberBig a { display:inline; color: #000000; font-size: 11px; width: 414px; height: 61px; float: right; color: black; text-decoration: none; } .memberBig img { width: 414px; height: 61px; border: 0; } "collectionBig" and "memberBig" are wrapped inside of the "bottombox" div any help is appreciated. -S Simple question but I'm curious if anyone can work out how the 'Browse' buttons are done on this page, they have rounded corners yet looking through the css I can't see any images that account for them... http://www.haveamint.com/forum/ I'm designing a web site and I have everything look identical in IE 5.01-7, Firefox 1.5 and Opera 9 (I still have to check mac compatibility) - though one thing that isn't the same on all is the input buttons. In IE, they're relatively the same but in Firefox it is completely off. I've attached an image to show what they all look like. I've tried a few things but I can't manage to get the firefox button to align correctly with the text input to the left of it. Here's my CSS for the inputs: Code: input { background: #fff; border: 1px solid #000; height: 23px; } any help is appreciated, thank you! Hi, Im just learning css and notice that alot of elements such as navigation can be done using bullet points. Im wanting to make the .nav div into a button so i need to to be 30 pixels high and have a have a 1pixel white line underneath it, also is there a way to stop the indent? my second question is when i add an image as a bullet point its aligned to the bottom of the text, can you change the position of it so its in the middle of it? Code: .nav { height:30px; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight:bold; line-height:30px; } .bul-sec { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; list-style-position: outside; list-style-image:url(images/bullets/sec.gif); line-height:30px } or is there a better way to do this? Thanks! Was working on a new design for one of my sites today and when I inadvertently discovered using buttons as tabs, however... I am more of a programmer than I am a designer. The tabs look differently in Firefox than they do in IE. In IE, I give the currently tab more padding than the other buttons and those other buttons stay attached to the <div> below them. In Firefox/Mozilla, the other buttons are raised up. See here* *You will notice that the Home page has rounded corners, while the About page does not; can't decide which one I like better The other issue I have in IE is that when I button is being clicked/activated, it detaches itself from the <div> below. -- Maybe a good time to also ask how I can accomplish something using div's or span's that I used to do with table's: How would I have a 700px wide box, with a div at the top, split 50/50 so that I could have a small logo at the top left and a search box (on the same row) at the top right? I have always: Code: <table width="700"> <tr> <td width="50%">logo</td> <td width="50%" align="right">search box</td> </tr> </table> -- One mo If I am using HTML 4.01 strict, can I still use: Code: <td align="center" valign="middle"> or do I have to: Code: <td style="text-align:center;vertical-align:middle"> Cheers! Okay so I have a basic CSS navigation panel on the left-hand side of my webpage. Basically I surrounded an <li> tag with a solid border so it's a rectangle with some text in the middle (ie. about, home, contact us, articles, etc) and I linked it using an <a> tag: Example: Code: <ul> <a href="home.html" class="button"><li>HOME</li></a> <a href="about.html" class="button"><li>ABOUT</li></a> ... </ul> Then for CSS: Code: #navigation ul { width: 128px; list-style: none; margin: 0; padding: 0; } #navigation li { background: #CCC; padding-left: 5px; margin-top: 5px; border: 1px solid #000; border-left: 10px solid #336699; } #navigation a.button { color: #333; text-decoration: none; } #navigation a.button:hover { color: #FFF; } The url is: Wolfenzon Schulman It's a website for a firm I work for. So basically, on the FF edition, the buttons work as intended, the entire <li> tag is linked (<a>'ed) and you can click on any part of it to activate the :hover and follow the link. The IE version, you can only hover over the text and anywhere before that (probably because of the padding-left: 5px associated with it). No matter what I've seemed to come up with, the IE version will just not cooperate. Is there a way to create oval buttons with CSS? I have an image of the button, and if I slice the image up in three sections, for example with two ends and a middle section for text, it becomes a mess if you go over a certain length. Is there a better way using CSS? I've come across a bit of a problem, and I need some help. Here's the deal: I'm creating a button system that will allow for easy placement of BBCode tags. Obviously, I'm using <form> and <input type="text"> elements to construct the buttons. I found out that I can edit button labels through some simple CSS. I'm having a problem, though, with underlining text in one particular button. Here's the code in question: PHP Code: <input type="button" value="Underline" style="text-decoration: underline;" accesskey="u" /> Now, this code works correctly in IE (what a suprise :O), but FF fails to draw an underline under the button's text. I know its possible, because if you go onto any PHPBB-based forum you'll see two buttons that have underlined titles. Any idea how I should go about fixing this problem? I tried to reverse-engineer some of PHPBB's code, but alas to no avail. Help me if you can, please! Is there a way to make text flow through to a new line if there is too much text to fit in the defined width of a button? |