CSS - Creating Rounded Cellcorners Using Css And A Very Simple Html Table
I am trying to create a table with rounded cellcorners using 1 pixel gif's. It is possible to do this with html only but this creates an enormous amount of code.
Unfortunately the tables have to be inserted in the WYSIWYG editor of the Vignette V7 content management system and the people inserting the tabular data are novices and do not know anything about html. Therefore I have to use css and a very simple html table. This is the code I have created so far: Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Rounded Corner Test Using CSS</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .header { font-weight: bold; color: #FFFFFF; background-color: #666666; background-image: url(dot_br.gif); background-position: left top; background-repeat: no-repeat; } .light { background-color: #CCCCCC; background-image: url(dot_br.gif); background-position: left top; background-repeat: no-repeat; } .dark { background-color: #999999; background-image: url(dot_br.gif); background-position: left top; background-repeat: no-repeat; } .rounded { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; } --> </style> </head> <body> <table width="75%" border="0" cellspacing="1" cellpadding="3" class="rounded"> <tr class="header"> <td colspan="3">Title</td> </tr> <tr class="light"> <td>Text</td> <td>More text </td> <td>Contents</td> </tr> <tr class="dark"> <td> </td> <td> </td> <td> </td> </tr> </table> </body> </html> And this is the result: URL As you can see, using the css background property I can only place a pixel in one cellcorner at the time and I need to have them in all corners. Does anybody have an idea how to do this without making the html code too complicated? Similar TutorialsHi, How to create a rounded table, which has the td elements also rounded? Thank you hi. I am trying to create rounded tabs similar to the tabs on this page of yahoo personals: http://personals.yahoo.com/us/search/dashboard notice how there is a bit of an extension over the table boundaries where the rounded tabs exist over the search type. i am guessing this happens on of two ways: 1) there is another table that sits on top of the main table and the slice of tab with the rounded corners appears there. 2) a mix of float, position:absolute, etc which positions the top tab slices. I am using javascript and CSS to round the tabs. I have tried option #2 with so-so results. I am wondering what approach (please feel free to advise others if there are others) would be the most easy on the eye and bullet-proof to multiple browsers? I would be happy to provide code but thought i'd get the discussion going as the question is more conceptual than "why-doesn't-my-code-work". thanks! attempting to create a re-usable quote box like on this website right at the top, http://pownce.com/download/ I would prefer not to use an image, and I swear I have seen a tutorial or some variation of how to do this. I know there are several that are with rounded boxes, but I would like to create something like this, no rounded boxes involved. Thank you for ANY help. Hi: I'm told that forms cannot have rounded corners and that tables can. Question: How do you do it? hye peeps i need to create a external css for my website www. losttv . 50webs. com would someone please help me, i have no idea. ive made the site how i want it to look and i need the css else i wont pass my assignment. i have no idea how to create it either and have tried reading books? any advise would be SO welcome ricki Hi all, I've got an div set up for images, which just has a style of padding-right 15px; . Now, I've got a text div with a style of padding-right 5px; . Whenever I put that div in after the image div, the text appears below the image. Can anyone tell me how to make it so the text appears next to the image (on the right)? Cheers. Hello, I am trying to aling two unordered lists side by side by each other. I want them to look like: Code: Example 1: Example2: *blah *blah *blah *blah *blah *blah I'm running into two problems: 1) I can't get them spaced apart from each other. I tried putting them in a table, but the cells just sit right next to each other so there's no space. 2) Since it is an UL, the dotted bullet points are centered, however, I would like them left-justified like the example. Is this possible? Thanks guys, [EDIT] After posting, the example does not display like I want it. I want a whole SPACE GAP between the two lists. The post made them run together. Hi there. I am trying to create the attached image in style sheets. I have done everything, but now I'm stuck on the border of the bottom TD. Anyone got any suggestions on how to do this? Something like this gives real thick and uneven borders, is it possible to make the borders combine and become one single border when they are next to each other? I don't want to use seperate border-top border-left etc ... Thank you. Code: <HTML> <HEAD> <style type="text/css"> div.table div { border : 1px solid black; /* border-collapse : collapse; */ } div.table div.tr { clear : both; } div.table div.tr div.th { float : left; font-weight : bold; width : 25%; } div.table div.tr div.td { float : left; width : 25%; } </style> </HEAD> <BODY> <div class="table"> <div class="tr"> <div class="th">column 1</div> <div class="th">column 2</div> <div class="th">column 3</div> <div class="th">column 4</div> </div> <div class="tr"> <div class="td">num 1</div> <div class="td">num 2</div> <div class="td">num 3</div> <div class="td">num 4</div> </div> <div class="tr"> <div class="td">numAAA 1</div> <div class="td">numA 2</div> <div class="td">numAAAA 3</div> <div class="td">num 4</div> </div> <div class="tr"> <div class="td">num 1</div> <div class="td">num 2</div> <div class="td">num 3</div> <div class="td">num 4</div> </div> <div class="tr"> <div class="td">num 1</div> <div class="td">num 2</div> <div class="td">num 3</div> <div class="td">num 4</div> </div> </div> </BODY> </HTML> Hi all, i'd like to make a 'table' like div that has a column down the left hand side with one or more image tags and another cell on the right with text, however i would like to do this without specifying the height (other than 100% or 1px) or absolute position of the divs: Code: ___________________ |Image 1 |Text | |Image 2 |Text | | |Text | | |Text | ------------------- Currently i've got 3 divs: one for the outer 'table', one for the images 'cell' and one for the text 'cell'. Outer 'table' style: None (just a plain <div>) Images 'cell' style: height:100%;float:left Text 'cell' style: height:100% Here's the full code if you want it: Code: <div> <div style="height:100%;float:left;"><img src="mpi/scifi.gif" width="62" height="48" hspace="10" vspace="10" border="0"><br> <img src="mpi/scifi.gif" width="62" height="48" hspace="10" vspace="10"></div> <div style="height:100%"> [div 2] Shows text on the right <br> <br> continues downwards no matter how much text appears<br> <br> <br> <br> <br> <br> Even down here [/div2] <br> </div> </div> This works great in i.e. but not mozilla, anyone have any ideas? Trying to create a table psuedo class so that the specific attributes apply to the target table. Not sure if my syntax is correct. What I would like is to call the ID DataTable and have it cascade thru the tr, td...... Here are my tags: #DataTable { width:auto; border-collapse: collapse; border:1px solid #cccccc; border-spacing :20px;} #DataTable tr { border-spacing:20px;} #DataTable td.headerDescription{ width: 240px;} #DataTable td.fundCell { width: 240px; text-indent:40px;} #DataTable td.percentageCell { width: 60px; vertical-align:middle; text-align:center; border-right:1px solid #cccccc;} #DataTable td.seperator { border-top:1px solid #cccccc;} #DataTable td.assetCategory { width: 240px; text-indent:20px; vertical-align:middle;} #DataTable td.headerColumn { font-weight:bold ; width:40px; background-color:#F0F0F0 ; text-align :center;} #DataTable td.leftHeaderColumn { font-weight :bold ; width:40px; background-color:#E0E0E0 ; text-align :center ; border-left:1px solid #cccccc;} #DataTable td.assetClass { width: 240px; vertical-align:middle; font-weight :bold;} #DataTable td.performanceCell { width:60px; background-color:#E0E0E0 ; text-align :center ; vertical-align :middle;} ok im fairly new to css and so i am working and learning from examples however i would like to know how one would go about changing the following table to a CSS layout using divs. Code: <table style="margin: 0 auto" cellspacing="1" cellpadding="2"> <tr class="gen_small" style="height:50px"> <td align="center">{FORUM_OPEN}</td> <td width="100">Open Forum</td> <td align="center">{FORUM_LOCKED}</td> <td width="100">Closed Forum</td> <td align="center">{FORUM_NEW}</td> <td width="100">New Posts</td> </tr> </table> I am trying to set up the following table: Code: <form method='post' action='form.php'> <table border=0 cellpadding='2'> <tr> <td><b>First Name: <font color='red'>*</font></b></td> <td><input type='text' name='f_name' size=45></td> </tr><tr> <td><b>Last Name: <font color='red'>*</font></b></td> <td><input type='text' name='l_name' size=45></td> </tr><tr> <td><b>Telephone Number: <font color='red'>*</font></b></td> <td><input type='text' name='phone' size=45></td> </tr><tr> <td><b>Email Address: <font color='red'>*</font></b></a></td> <td><input type='text' name='email' size=45></td> </tr><tr> <td><b>Website:</b></td> <td><input type='text' name='website' size=45></td> </tr><tr> <td><b>Subject: <font color='red'>*</font></b></a></td> <td><input type='text' name='subject' size=45></td> </tr><tr> <td><b>Message: <font color='red'>*</font></b></td> <td><input type='text' name='message' size=45></td> </tr> <tr> <td><input type='submit' value='Valuate'></td> </tr> </table> </form> The next to last td cell (message) I obviously need the height of this cell to be much higher and wider so people can type a message. However, I have tried td rowspan and colspan all with no results. What am I doing wrong? Hello. My first post at this section I'm trying to familiarize with all the positioning properties in CSS but got stuck when trying to migrate the table at the bottom of this code, to div blocks: 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></head> <style> body { margin: 0; padding: 0; font-size: 90%; font-family: "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif; background-color: #FFF; color: #000; } table, div { padding: 15px; margin: 0; background-color: #464646; height: 30px; width: 100%; } tr, div div { color: #FFFFFF; font-size: 18px; height: 100%; } </style> <body> <table class="top"><tr><td>Product Name</td><td align="right">Company Name</td></tr></table> </body> </html> I tried wrapping two <span> inside a <div> and float the second <span> to the right, but from what I read so far, floating is not the solution because it sets the element as a block even if it's inline. Although it works using plain old tables - btw why is IE rendering a somewhat different page then FF? - and I should follow the KISS rule I want to learn how can I make this work. Thank you a lot! Hi, What is the best way achieve this using divs instead of a table. I have done it but it was such a long winded method. I've been going round in circles: Code: <table> <tr> <td align="left">Stuff 1</td> <td align="center">Stuff 2</td> <td align="right">Stuff 3</td> </tr> </table> Thanks in advance, and apologies if I look like a dumbass. Okay, so I've been trying to figure out the easiest way to make a layer with rounded corners in CSS. I used the 4 corner image way (as opposed to using JavaScript, or a single scalable image). The problem isn't my "main" layer, it's that I have two layers within that "main" layer that need to be positioned correctly (a "navbar" and "content"). The "navbar" I have as float: left, and the same for the "content." Long story short, the "content" window (that also has rounded corners) goes all the way to the right of the "main" layer. I want there to be a margin on the right, but if I put one, the "main" layer messes up big time and goes past the original width it was at. Anyone got an answer to my problem (unlikely, since I didn't explain it very well I don't think) or a simple tutorial I can do? Here's what I want (LINK). How all the divs are rounded in this css ???? I am looking at the images and none f them has any image of a rounded corner ? Code: body { margin: 10px 0; padding: 0; background: #FFFFFF url(images/img00.gif) repeat-x; font: normal small Georgia, "Times New Roman", Times, serif; color: #6B6B6B; } h1, h2, h3, h4, h5, h6 { margin: 0; padding: 0; font-weight: normal; color: #3787DE; } h1, h2, h3 { } h4, h5, h6 { } p, ul, ol, blockquote { margin-top: 0; line-height: 160%; } blockquote { font-style: italic; } a { text-decoration: none; color: #3787DE; } a:hover { text-decoration: underline; color: #990000; } img { border: none; } /* Header */ #header { width: 760px; height: 101px; margin: 0 auto; background: url(images/img01.gif) no-repeat; } #header h1 { float: left; padding: 25px 0 0 20px; letter-spacing: -3px; font-size: 3.4em; } #header h2 { float: right; padding: 43px 20px 0 0; letter-spacing: -1px; font-size: 2em; } #header a { text-decoration: none; } /* Content */ #content { width: 720px; margin: 0 auto; padding: 20px; background: url(images/img02.gif) no-repeat; } /* Posts */ #posts { float: left; width: 320px; } .post { } .post .title { letter-spacing: -1px; font-size: 2em; } .post .posted { margin-bottom: 20px; font-size: .8em; } .post .story { } .post .meta { height: 50px; padding: 8px 0 0 10px; background: url(images/img09.gif) no-repeat; font-size: .8em; } /* Archives */ #archives { float: left; width: 180px; padding: 0 0 0 20px; } /* Search */ #search { float: right; width: 180px; } #search form { margin: 0 0 12px 0; padding: 0; } #search #textfield1 { width: 155px; } #search #submit1 { display: none; } /* Pages */ #pages { float: right; width: 180px; } /* Categories */ #categories { float: right; width: 180px; } /* Blog Roll */ #blogroll { float: right; width: 180px; } /* Orange Box */ .obox { } .obox .heading { height: 27px; padding: 4px 0 0 10px; background: url(images/img03.gif) no-repeat; letter-spacing: -1px; font-size: 1.4em; color: #FF6500; } .obox .content { padding: 10px; background: url(images/img04.gif) no-repeat; } .obox ul { margin: 0; padding: 0; list-style: none; } .obox li { padding-left: 15px; background: url(images/img05.gif) no-repeat left center; } .obox a { color: #FF6500; } /* Green Box */ .gbox { } .gbox .heading { height: 27px; padding: 4px 0 0 10px; background: url(images/img06.gif) no-repeat; letter-spacing: -1px; font-size: 1.4em; color: #09881C; } .gbox .content { padding: 10px; background: url(images/img07.gif) no-repeat; } .gbox ul { margin: 0; padding: 0; list-style: none; } .gbox li { padding-left: 15px; background: url(images/img08.gif) no-repeat left center; } .gbox a { color: #09881C; } /* Footer */ #footer { width: 760px; margin: 0 auto; padding: 60px 0 0 0; background: url(images/img10.gif) no-repeat; } #footer p { margin: 0; padding: 0; text-align: center; font-size: x-small; } I have copied this tutorial, but my divs are not showing rounded, but still square. http://www.sitepoint.com/article/ro...-css-javascript Tut link Can anyone see what I've done wrong? I have attached a screenshot as the webpage is located on a protected server. The header is what I'm trying to make round. I have stroked it in black to show you My html: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html> <head> <title>Test Rounded Div</title> <link href="styles.css" rel="stylesheet" type="text/css" /> </head> <body> <div class="container" align="center"> <div class="header"> <div> <!-- upper left corner--> <div> <!-- bottom right--> <div> <!-- bottom left --> Header </div> </div> </div> </div> <div id="left">Left</div> <div id="right">Right</div> <div id="footer">Footer</div> </div> </body> </html> My CSS: Code: div.header { width: 200px; background: #4095BF url(img/blue_top_rt.gif) no-repeat top right; } div.header div { background: transparent url(img/blue_top_left.gif) no-repeat top left; } div.header div div { background: transparent url(img/blue_bottom_rt.gif) no-repeat bottom right; } div.header div div div { background: transparent url(img/blue_bottom_lt.gif) no-repeat bottom left; padding: 15px; } 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/ Hi, Does anyone know of a way to do the effect of rounding corners (see attached image) in CSS? As you'll see in the image, I just want 1 pixel to be offset and be in a different colour for each corner of my box. |