CSS - Border Issue When Creating A Table With Div Tags
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> Similar Tutorialsusing css i've got a table in a div: e.g. div padding: 20px table width: 540px border: 10px solid red; result: the div including it's own padding should be 600px wide but using the html strict dtd ie is in strict mode (confirmed by other measurements) the whole width of the table is 540px including the borders. also setting box-sizing to contents . thoughts? I'm having some issues with getting a table border to appear in both Mozilla and IE. I had it working at one point but now it's stopped working in IE. Basicly this is the code to control it: border:1px solid #0; but IE doesn't read it, I've checked the rest of the CSS to see if there is any conflicts but found none. Anyone know how to get the table border to appear in both IE and Mozilla? hey i have applied a style to a select tag which should be displaying a red border... but it doesn't work....however THIS WORKS IN OPERA 7 but doesn't work in IE and Mozilla :S go to the site and click submit straight away...as you can see there is no border applied to the second drop down box! does anyone no how to apply a border to a select tag site is located at http://studentwork.qantm.com.au/pking/website/feedback.cfm cheers Hi all, I'm trying to create a horizontal menu in CSS and each link has a background image. So I need an image to start the menu, the images for the buttons in the middle, and an image for the end of the menu. Code: #topnav1 { position: absolute; height: 18px; top: 43px; left: 300px; font-weight: bold; } #topnav1 ul { margin:0; padding: 0; width: 420px; height: 18px; display: inline; } #topnav1 #first li { list-style-type: none; display: inline; background-image: url(../images/topnav1_1_bg.gif); background-repeat: no-repeat; background-position: bottom left; padding-left: 40px; padding-bottom: 4px; } #topnav1 li { display: inline; background-image: url(../images/topnav1_2_bg.gif); background-repeat: no-repeat; background-position: bottom left; padding-left: 34px; padding-bottom: 4px; } #topnav1 #last li { display: inline; background-image: url(../images/topnav1_3_bg.gif); background-repeat: no-repeat; background-position: bottom right; padding-right: 10px; padding-bottom: 4px; } First: It seems that as soon as I apply the 'display: inline; code to the 'li' tags, the browser completely ignores the height, width, and padding settings that I put on there. So the background image isn't being displayed properly. Second: I want to align the menu to the right of the page - how can I do this? Cheers! Hi, I'm trying to create a border around the body, no matter how wide the window is. Here is an example:click here You will notice that the right hand border is to far right. He's the css for the body tag: Code: body { background-image: url(images/bkg.gif); background-repeat: repeat-x; font-family:"Lucida Grande", "Lucida Sans Unicode", "bitstream vera sans", "trebuchet"; background-color: #414548; border-style:solid; border-width:24px; border-color:#414548; border-bottom-width:200px; width:98%; height:100%; margin-left:0; margin-right:0; } I think the problem isn't in the body CSS, but maybe some place else. I can't figure it out. Can someone help? thanks So, I'm trying to find out if there's an easy way to create a shadow around a border. Essentially, I've got a white background div, with an inner div that takes up part of the white. The inner div has a gray background, and I want to somehow give it the impression of being raised from the white. I couldn't find too much searching through google.. then again, not sure what exactly I need to search for in google. Any help would be greatly appreciated. Thanks Hi, This used to be my solution: Code: <table border=1 bordercolorlight='#CCCCCC' Bordercolordark='#FFFFFF'> But this only works well on IE - not Mozilla Now I want to use CSS: Code: .results { border: 1px solid #CCCCCC ; } Code: <table class='results'> --------------- The problem is, with CSS, only the TABLE acquires the border property. The cells within it don't. If I specify Code: <td class='results'> for all the cells in the table, this also won't work, because the cell borders overlap each other and some border lines seem thicker than others (because of overlapping). Is there any simple way I can specify the border property for the table - in ONE declaration? I want the table and td borders all to be a simple 1px width ...is that possible in one declaration? Thanks a lot! I would like to set up a table with a different border than the cells inside it. Here's my code: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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 type="text/css"> TABLE {border: 1px solid black; border-collapse: collapse; width: 200px} TD {border: 1px solid #ccc} </style> </head> <body> <table> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> <tr> <td> </td> <td> </td> <td> </td> </tr> </table> </body> </html> That's all hunky dory in (gasp!) IE, but good browsers...they only show the lighter gray color. How do I get the table border to be different? Alright, this is probably a simple fix but I can not find the solution anywhere. I'm trying to highlight a table cell with a 2px solid red border when it is clicked. Is there a way to get this to happen with out changing the size of the cell? I hope this makes sense. Basically the cell is expanding by 1 px causing movement in the table. In a CSS I have a couple of styles defined for different tables. My problem is that on one table I want borders around each TDk and I don't want them around another. The only way I've found to affect the borders was to define a TD element, but that makes all the tables have borders. What do I do? Hi all, I have a content div wrapping two inner divs. The widths of the inner divs (div A, div B) add up to the total width of the content div. div A is floated left. Everything displays correctly, until I put a 1px solid border on the content div. In IE 6, div B renders below div A. All margins and paddings are 0px. When I adjust div B's width to factor in the content div's border, the divs position correctly, but there is a gap between div B and the border. Can someone tell me why this is happening and how to fix it? Thanks in advance Okay, I know this has been discussed a lot here and I did a lot of searching including reading through ie problem with drop down menu, but I'm still having a heckuva time getting mine to work. Here it is: http://www.jimandkris.com/test/verticalpopout.html When viewing in IE, on any parent menu item with children, it expands downward a few pixels when hovered over. I'm shooting for something like this: http://sperling.com/examples/menuv/ The *html hack isn't fixing it like I hoped. What am I missing? Second, and not as major, in FF my top border (in red) doesn't extend the entire length of the li for either the parent or the children. Thoughts on that? Thanks again! I have the following code in my page for the links styles: Code: a:link, a:visited, a:active { font-weight: bold; color: #000099; text-decoration: none; background-color: #C4E4F7; border: 1px solid #000066; } a:hover { font-weight: bold; color: #FC6103; text-decoration: none; background-color: #FFEAD5; border: 1px solid #974B00; } The thing is, that in firefox, the code works fine, but on IE the top and bottom border sections are not displayed... Can't understand why... Any ideas how to fix it? this is what happen... as you can see from the 2 images Mozilla does not use the border in the way IE6 does (it should be all around the images) why ??? Code: <span class="minilogo"><img src="../images/minilogo/minilogo_armatabrancaleone.gif" border="0" /></span> .minilogo {background-color:#fff; border:2px dashed #88f; } the code will come from a php page with 4 gif in a row... thank you Roberto www . gameyin . com It shows as the border image twice. Er...I mean the image is showing twice and no matter what I do I can't seem to get the bottom part to stretch more to meet the content. I don't want to try pixels though because that wouldn't be fluid : \. Any help? I'm building a series of navigation links in boxes on top of each other. I want to pad the links inside their div tags 3 pixels all the way around. I'm seperating the boxes using the border property, 1px solid on the bottom of each cell. The top and the bottom are handled in a seperate class. In firefox, the brower adds the 3 pixels to the overall width (maybe six since I'm padding left/right) so the page comes out like this: --------- | Link 1 | ------------- | Link 2 | ------------- | Link 3 | ------------- Now in IE, it looks correctly. I'm not sure which one is correct, but since IE looks right I assume it's correct. Any way to get the padding to be handled consistently in 2 browsers? Hey all, I am working on completely redoing our website (FizzPow.com) I have a border-right: on my left column in a wordpress template I am modifying. It looks fine in Chrome, IE9, Safari5, but in FF7, it moves my right column all the way down. Here's the site: FizzPow.com/newsite I am an experienced programmer but fairly novice with HTML/CSS. Please be kind and I very much appreciate your help! My site is: adventurevalley.ca/jason The current CSS file appears to work problem free in IE7 and FF, but Im having no luck in IE6. I realise things like the hover highlighting and menu indent will not work which I am fine with, however the corners and different box size are driving me insane. Can someone please point me in the right direction?! Thanks, Jason Hello, Here is an example of the issue I'm having.. http://www.patricksaviation.com/backend.php In Firefox and IE, the border color is correct, but in Opera the color is just black; this is caused by applying border-collapse: collapse. I tried adding, in addition to to the standard html bordercolor, a CSS border-color, which helped change Opera to a dark green (not the right color, but closer) but it also causes the border color in IE to darken (the wrong color). Does anyone know what causes this or how I could fix it? Thanks, Patrick the 2 pages below have some general layout css issues, like too much white space above the grey line AND though they both use the same right bar (I uses a PHP include) the format is different in both. The green line is the toughest...it won't extend the height of the page. Any ideas? I attached my style sheet as well. thanks. http://bowtree.org/latest/luminaries.php http://bowtree.org/latest/index.php |