Here is the result I need to achieve:
Here is what I have thus far:
As you can see, there are several updates to be made.
My questions are:
1./ How do I get the text next to the avatar to line up 10px to the right of the avatar. Currently its being thrown below the avatar.
2./ Once I align up the text next to the avatar, how do I then line up my text that sits at the very right? I believe I can create a div and float right
I'm only a few days into CSS so I'm still a newbie so please any details would be phenomenial
Here is my HTML:
<div class="page">
<table class="reviewsouter" cellspacing="0" cellpadding="0">
<tr>
<td class="reviewleft">
<div id="reviews">
<table cellpadding="0" cellspacing="0">
<tr class="reviewuserinfo">
<td>
<div>test</div>
<img class="avatar" src="/avatar/35274"/>
</td>
</tr>
<tr class="reviewuserdata">
<td></td>
</tr>
</table>
</div>
</td>
<td class="reviewright"></td>
</tr>
</table>
</div>
And Here is my CSS:
#CHARSET "UTF-8";
.page {
position: relative;
background-color: #ffffff;
width: 1200px;
margin: 0px auto;
box-sizing: border-box;
border-left: 1px solid #d0d0d0;
border-right: 1px solid #d0d0d0;
}
table {
border:0px;
width:100%
}
table.reviewsouter .reviewleft{
width:800px
}
table.reviewsouter .reviewright{
width:400px
}
#reviewspotlight {
position: relative;
background-color:#000000;
height:111px;
z-index:19997;
font-family: DinWebCond, Sans-serif;
color:#ffffff;
}
#reviews {
position: relative;
background-color:#ffffff;
color:#000000;
border-right:1px solid #d0d0d0;
}
#reviews table tr.reviewuserinfo {
background-color:#f0f0f0;
height:60px;
border-left:1px solid #d0d0d0;
}
#reviews table tr.reviewuserinfo img.avatar{
position:relative;
width:40px;
height:40px;
margin:10px 0px 10px 10px;
}
#reviews table tr.reviewuserinfo div {
display:block
}
#reviews table tr.reviewuserdata {
background-color:#ffffff;
height: 315px;
border-left:1px solid #ffffff;
}
Any help would be great.
UPDATE
Ok so I got this far now:
Here is my new HTML for this div(the reviewuserinfo div):
<tr class="reviewuserinfo">
<td width="60px"><img class="avatar" src="/act/avatar/35274"/></td>
<td>Text2</td>
<td align="right" style="padding-right:15px">Text3</td>
</tr>
What I need now is to move the text up so it starts at the same position as the top of the avatar - basically horizontal to the top of the image avatar
What do you think about this https://jsfiddle.net/2Lzo9vfc/107/
HTML
<div class="page">
<div class="left">
<img src="http://placehold.it/50x50" alt="">
<div class="left-content">
<h4>Lorem ipsum</h4>
<p>Posted bla bla</p>
</div>
</div>
<div class="right">
<p>Joined lorem ipsum</p>
<p>12 reviews bla lorem ipsum</p>
</div>
</div>
CSS
body, h4, p {
margin: 0;
padding: 0;
}
.page {
padding: 20px;
background: #F0F0F0;
clear: both;
display:inline-block;
width: 100%;
}
.left {
float: left;
}
.right {
float: right;
}
.left-content, img {
display: inline-block;
vertical-align: middle;
}
What if you simply add horizontal cells and include the image and text in each one of them?
Related
I'm trying to make a 2x5 table with a large image taking up the left most five cells and 5 links taking up the rightmost ones. I am having trouble fitting the table to the image.
I'd like the table to be a single rectangle in the end but currently the table is bigger than the image inside of it. Also, is there any way to do this just using CSS (no JS)?
Thank you in advance.
Here is jsfiddle: https://jsfiddle.net/3ktLpcmx/2/
and code:
HTML:
<table style="height:376px; width:600px; border-spacing:0px; padding:0px; border-collapse:collapse; border:none;" cellspacing=0 cellpadding=0>
<tr>
<td rowspan="5"><img style="display: block;" src="http://wallpapercave.com/wp/ckdySrm.png" width="500" /></td>
<td class="linktd">Mmmmmhmmm</td>
</tr>
<tr>
<td class="linktd">hmmmhhhhhmmm</td>
</tr>
<tr>
<td class="linktd" >MMMM MMMM!</td>
</tr>
<tr>
<td class="linktd">mmmmmmm hm mmmmm</td>
</tr>
<tr>
<td class="linktd">Hmmm, mmmhmmmm</td>
</tr>
</table>
CSS:
body {
text-align: center;
}
.linktd {
background-color: #58809d;
text-align:center;
vertical-align:middle;
width: 165px;
height:20%;
}
.linktd:hover {
background-color: #282969;
}
.homelink {
/*margin-bottom: 10px;*/
padding: 15px 10px 10px 10px;
width: 165px;
height:100%;
display:inline-block;
background-color:#58809d;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
}
.homelink:hover {
background-color:#282969;
}
EDIT:
Things I have tried include removing the padding on the links, setting table height to auto (then links don't fill their cells), setting table to 375px (size of image), setting table to 376px, and setting the link-tds to 20% of table.
I do not think a table is needed here. nav could do for a menu .
display:flex will help size, align, grow and center things.
nav,
nav span,
nav span a {
display: flex;
}
nav span {
flex-flow: column;
}
a {
flex: 1;
width: 165px;
justify-content: center;
align-items: center;
background-color: #58809d;
color: #FFFFFF;
font-weight: bold;
text-decoration: none;
}
a:hover {
background-color: #282969;
}
nav img {
display: block;
}
<nav>
<img src="http://wallpapercave.com/wp/ckdySrm.png" width="500" />
<span>
Mmmmmhmmm
hmmmhhhhhmmm
MMMM MMMM!
mmmmmmm hm mmmmm
Hmmm, mmmhmmmm
</span>
</nav>
J.Joe, Your answer works well and is clever. Thank you.
<table style="height:376px; width:600px; border-spacing:0px; padding:0px; border-collapse:collapse; border:none;" cellspacing=0 cellpadding=0>
<tr>
<td class = "test" rowspan="5"></td>
<td class="linktd">Mmmmmhmmm</td>
</tr>
<tr>
<td class="linktd">hmmmhhhhhmmm</td>
</tr>
<tr>
<td class="linktd" >MMMM MMMM!</td>
and
body {
text-align: center;
}
.test{
background-color: #cccccc;
background-image:url('http://wallpapercave.com/wp/ckdySrm.png');
background-size:cover;
}
.linktd {
background-color: #58809d;
text-align:center;
vertical-align:middle;
width: 165px;
height:20%;
}
.linktd:hover {
background-color: #282969;
}
.homelink {
/*margin-bottom: 10px;*/
padding: 15px 10px 10px 10px;
width: 165px;
height:100%;
display:inline-block;
background-color:#58809d;
color:#FFFFFF;
font-weight:bold;
text-decoration:none;
}
.homelink:hover {
background-color:#282969;
}
I cannot get a table row data (td) to decrease it's width. The problem is that the avatar td seems to take up the majority of the entire row. I need the text with Traveler column to move to the left as shown
Here is the current progress of what I have:
This is what it's supposed to look like.
If you look, the gray container has text on the right side and text that should be directly next to the avatar image
There is an established two columns of text (that row is 3 table cells long) The problem is that one of my td's has a width that is causing the column starting with Traveler to be pushed so far right.
So here's my HTML:
<div id="reviews">
<table cellpadding="0" cellspacing="0">
<tr class="reviewuserinfo">
<td width="60px"><img class="avatar" src="/avatar/35274"/></td>
<td>Traveler<br>posted on 15 May, 2008</td>
<td align="right" style="padding-right:15px">Joined 2 years ago<br>12 reviews and 49 comments posted</td>
</tr>
<tr class="reviewuserdata">
<td style="width:100%" colspan="3">
<table cellpadding="0" cellspacing="0" class="reviewchart">
<tr><td><h2>Overall Rating <img class="stars" src="/stars/3.9/large" /> <span class="rating">4.5</span></h2></td></tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0">
<tr><td class="reviewlabel" style="padding-top:15px">QUALITY OF THE DANCERS</td></tr>
<tr><td class="reviewlabel">PRIVATE DANCES, VALUE FOR MONEY</td></tr>
<tr><td class="reviewlabel">OVERALL HOSPITALITY</td></tr>
<tr><td class="reviewlabel">GUEST TO DANCER RATIO</td></tr>
<tr><td class="reviewlabel">VARIETY OF DANCERS</td></tr>
<tr><td class="reviewlabel">VALUE FOR MONEY, COVER CHARGE</td></tr>
<tr><td class="reviewlabel">VALUE FOR MONEY, DRINKS</td></tr>
<tr><td class="reviewlabel">VALUE FOR MONEY, FOOD</td></tr>
<tr><td class="reviewlabel">OVERALL ATMOSPHERE</td></tr>
<tr><td class="reviewlabel">SOUND SYSTEM AND DJ</td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
And finally here's my CSS:
#CHARSET "UTF-8";
.page {
position: relative;
background-color: #ffffff;
width: 1200px;
margin: 0px auto;
box-sizing: border-box;
border-left: 1px solid #d0d0d0;
border-right: 1px solid #d0d0d0;
}
table {
border:0px;
width:100%
}
table.reviewsouter .reviewleft{
width:800px
}
table.reviewsouter .reviewright{
width:400px
}
#reviewspotlight {
position: relative;
background-color:#000000;
height:111px;
z-index:19997;
font-family: DinWebCond, Sans-serif;
color:#ffffff;
}
#reviews {
position: relative;
background-color:#ffffff;
color:#000000;
border-right:1px solid #d0d0d0;
}
#reviews table tr.reviewuserinfo {
background-color:#f0f0f0;
height:60px;
border-left:1px solid #d0d0d0;
}
#reviews table tr.reviewuserinfo img.avatar{
position:relative;
width:40px;
height:40px;
margin:10px 0px 10px 10px;
display: inline-block;
vertical-align: middle;
}
#reviews table tr.reviewuserinfo div {
display:block
}
#reviews table tr.reviewuserdata {
background-color:#ffffff;
height: 315px;
border-left:1px solid #ffffff;
vertical-align: top;
}
#reviews table td h2 {
position:relative;
display:inline-block;
white-space:nowrap;
font:24px/24px DinWebCond,Sans-serif;
margin:0px;
text-transform:uppercase;
/**padding:20px 0px 9px 15px;*/
/**padding-top:20px;*/
/**padding-left:20px;*/
}
#reviews table td h2 img.stars {
position:absolute;
margin-left:10px;
display:inline-block;
}
#reviews table td h2 span.rating{
position:absolute;
margin-left:145px;
display:inline-block;
color:#e85a06;
font-weight:bold;
}
table.reviewchart {
position:relative;
display:inline-block;
white-space:nowrap;
border-collapse: collapse;
font:14px/14px DinWebCond,Sans-serif;
margin:0px;
text-transform:uppercase;
/**padding:20px 0px 9px 15px;*/
padding-top:20px;
padding-left:20px;
}
table.reviewchart td.reviewlabel{
/**padding-top:15px;*/
padding-bottom:15px;
}
UPDATE
Ok so i was able to fix the width position for the text by adding a colspan of 3 however the word Traveler is pushed to the right still. I tried setting margins and paddings but that did not work.
Here is my current progress:
Late to the party, but yes, colspan="3" is needed. Then, what you can do is add width="1%" to the cell with the image and update your css to have margin: 10px; instead of margin: 10px 0 10px 10px; for the image. That should fix it.
.page {
position: relative;
background-color: #ffffff;
width: 1200px;
margin: 0px auto;
box-sizing: border-box;
border-left: 1px solid #d0d0d0;
border-right: 1px solid #d0d0d0;
}
table {
border:0px;
width:100%
}
table.reviewsouter .reviewleft{
width:800px
}
table.reviewsouter .reviewright{
width:400px
}
#reviewspotlight {
position: relative;
background-color:#000000;
height:111px;
z-index:19997;
font-family: DinWebCond, Sans-serif;
color:#ffffff;
}
#reviews {
position: relative;
background-color:#ffffff;
color:#000000;
border-right:1px solid #d0d0d0;
}
#reviews table tr.reviewuserinfo {
background-color:#f0f0f0;
height:60px;
border-left:1px solid #d0d0d0;
}
#reviews table tr.reviewuserinfo img.avatar{
position:relative;
width:40px;
height:40px;
margin:10px;
display: inline-block;
vertical-align: middle;
}
#reviews table tr.reviewuserinfo div {
display:block
}
#reviews table tr.reviewuserdata {
background-color:#ffffff;
height: 315px;
border-left:1px solid #ffffff;
vertical-align: top;
}
#reviews table td h2 {
position:relative;
display:inline-block;
white-space:nowrap;
font:24px/24px DinWebCond,Sans-serif;
margin:0px;
text-transform:uppercase;
/**padding:20px 0px 9px 15px;*/
/**padding-top:20px;*/
/**padding-left:20px;*/
}
#reviews table td h2 img.stars {
position:absolute;
margin-left:10px;
display:inline-block;
}
#reviews table td h2 span.rating{
position:absolute;
margin-left:145px;
display:inline-block;
color:#e85a06;
font-weight:bold;
}
table.reviewchart {
position:relative;
display:inline-block;
white-space:nowrap;
border-collapse: collapse;
font:14px/14px DinWebCond,Sans-serif;
margin:0px;
text-transform:uppercase;
/**padding:20px 0px 9px 15px;*/
padding-top:20px;
padding-left:20px;
}
table.reviewchart td.reviewlabel{
/**padding-top:15px;*/
padding-bottom:15px;
}
<div id="reviews">
<table cellpadding="0" cellspacing="0">
<tr class="reviewuserinfo">
<td width="1%"><img class="avatar" src="/avatar/35274"/></td>
<td>Traveler<br>posted on 15 May, 2008</td>
<td align="right" style="padding-right:15px">Joined 2 years ago<br>12 reviews and 49 comments posted</td>
</tr>
<tr class="reviewuserdata">
<td style="width:100%" colspan="3">
<table cellpadding="0" cellspacing="0" class="reviewchart">
<tr><td><h2>Overall Rating <img class="stars" src="/stars/3.9/large" /> <span class="rating">4.5</span></h2></td></tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0">
<tr><td class="reviewlabel" style="padding-top:15px">QUALITY OF THE DANCERS</td></tr>
<tr><td class="reviewlabel">PRIVATE DANCES, VALUE FOR MONEY</td></tr>
<tr><td class="reviewlabel">OVERALL HOSPITALITY</td></tr>
<tr><td class="reviewlabel">GUEST TO DANCER RATIO</td></tr>
<tr><td class="reviewlabel">VARIETY OF DANCERS</td></tr>
<tr><td class="reviewlabel">VALUE FOR MONEY, COVER CHARGE</td></tr>
<tr><td class="reviewlabel">VALUE FOR MONEY, DRINKS</td></tr>
<tr><td class="reviewlabel">VALUE FOR MONEY, FOOD</td></tr>
<tr><td class="reviewlabel">OVERALL ATMOSPHERE</td></tr>
<tr><td class="reviewlabel">SOUND SYSTEM AND DJ</td></tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
Everything after the column with the image is one big column . You're telling it to alight right so it's moving everything to the very right of that column. remove this or make it align="left" and it should fix your issue.
The title explains a-lot of the issue. I am an unable to get the text to overlay the image. I wish to have the text in the centre of image inside the div I've put it in.
CSS:
#charset "UTF-8";
#main-page-content {
max-width:960px;
margin:auto;
max-height: 500px;
position: relative;
}
#bitcoin-price-space {
width: 960px;
padding-top:20px;
height: 40px;
margin:auto;
}
.bitcoin-price-content {
position: relative;
width: 100%; /* for IE 6 */
}
h2 {
position: absolute;
top: 0px;
right: 100;
width: 100%;
}
HTML (Sorry about how this is formatted):
<div id="bitcoin-price-space">
</div>
<div id="main-page-content">
<table align="center" width="960px" border="0">
<tbody>
<tr>
<div class="bitcoin-price-content"> <td align="center">
<img src="data/design/images/buy-bitcoins.png" width="80%" height="275" align="center" onMouseOver="this.src='data/design/images/buy-bitcoins-hover.png'"
onMouseOut="this.src='data/design/images/buy-bitcoins.png'"alt=""/></td>
<h2 align="right">Test</h2>
</div>
<td background=align="center"><img src="data/design/images/sell-bitcoins.png" width="80%" height="275" align="center" onMouseOver="this.src='data/design/images/sell-bitcoins-hover.png'" onMouseOut="this.src='data/design/images/sell-bitcoins.png'" alt="" id="bitcoin-sell-image"/></td>
</tr>
</tbody>
</table>
</div>
Result of the above code:
No tables, only 1 image the rest is CSS version. The hover effect is also handled by CSS. It isn't exactly what you started with but should give you something to think about.
.bitcoin-transaction
{
width:900px;
padding:0 30px;
}
.bitcoin-transaction>div
{
height:310px; /*Height + Margin*/
width:384px; /*0.8 * 960 / 2 */
margin-left:auto;
margin-right:auto;
margin-top:35px;
border:solid 2px #000;
border-radius: 10px;
box-sizing: border-box;
float:left;
text-align:center;
-webkit-box-shadow: 10px 10px 13px -7px rgba(34,34,34,1);
-moz-box-shadow: 10px 10px 13px -7px rgba(34,34,34,1);
box-shadow: 10px 10px 13px -7px rgba(34,34,34,1);
position:relative;
padding-top:32px;
}
.bitcoin-transaction>div:hover
{
-webkit-box-shadow: 7px 7px 10px -5px rgba(34,34,34,1);
-moz-box-shadow: 7px 7px 10px -5px rgba(34,34,34,1);
box-shadow: 7px 7px 10px -5px rgba(34,34,34,1);
}
.bitcoin-transaction .sell
{
float:left;
background-color:#F00;
}
.bitcoin-transaction .sell:hover
{
background-color:#F33;
}
.bitcoin-transaction .buy
{
float:right;
background-color:#0F0;
}
.bitcoin-transaction .buy:hover
{
background-color:#3F3;
}
.bitcoin-transaction>div:hover:before
{
transform:rotate(15deg);
}
.bitcoin-transaction>div:before /*bitcoin logo*/
{
transform:rotate(30deg);
transition: all 0.5s ease-out;
position:absolute;
top:-32px;
left:160px;
height:64px;
width:64px;
content: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyFpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJod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YvNdpLLbqAp7zSZLWWkWr7b9bbO2P1ldYrvJAJa/3Ob3INUIwuYImgjEFVPKS1dx6dQRXH7pBcxfuaA9Q1lWz8oW5IDVmBrv+WAmFfl8u2XePwg6gZ/CW2Py+ixZn3D2yTUjv0rW9xfZbOHfFUudf1IqncTypXOYZgUYmtyIvsEBDAwOope/mT8GuLXpIdvbPdxgVNJaD5pq4nRTwtZ3CHNXySsW5pBbmsXsuRM6cZmc1HNhd3KLVDr+aWr7/5mMB68IyfF8KfxTe2/Q8reviQcy6dR3ejOZ76xkcweXllZ/s1iuHihW61hZvKalTTZdZPoH0MN6n8qkEU/KPqIY2aF5J8hSNW6bHeXSqyMfKBcLJDAFFLKrWJ2/xskvqApt8jtFAmyuZNq1lO9fGhlMfbwnGT7ebFEV1ts//fcGX/0jRpBaOjjQ+2Qmk3pycTn/tmw2/6FisfoL0UjIFnASeqxSVni+cvyI9v9s7RSZVSRZG2xRsNRZwhoEwSalq5wT8JX+QqHY0erqOFYllY59JRmPPEy2+YI0RmRHSLvjqc7/f/7ucPeRoh6FYg70Z56iLH5qJVuaqlQq76nmKg9RYO2n8ouFVBAFfBXob7TyFzR0jUG3yXu62bpWl8NUO066HAyHn+9Nhf62LxN7NB4JLguryxdrCPF3wLZ+kim8cW+PS+7p1hTSYLK7y1R1n6B0/kSj3uxn+dzfarf31iut7fTsOCcsLyol5E17WU2XIJB3rWiRMul41nHCs+lM6BQ1CL0c+n4kHMh2CJzy/qDxuPuGvT3+fwQYAAGTIyw1V6kAAAAAAElFTkSuQmCC");
}
<div id="main-page-content">
<div class="bitcoin-transaction">
<div class="sell">
<h2>Sell Bitcoins</h2>
<h3>Test</h3>
</div>
<div class="buy">
<h2>Buy Bitcoins</h2>
<h3>Test</h3>
</div>
</div>
</div>
Insert your h2 inside the <td> element then set position:relative to your <td> element.
Maybe you wanted something like this :
#charset "UTF-8";
#main-page-content {
max-width:960px;
margin:auto;
max-height: 500px;
position: relative;
}
#bitcoin-price-space {
width: 960px;
padding-top:20px;
height: 40px;
margin:auto;
}
.bitcoin-price-content {
position: relative;
width: 100%; /* for IE 6 */
}
h2 {
position: absolute;
top: 0px;
width: 100%;
color:#fff;
z-index: 2;
color:#fff;
text-align: center;
}
td {
position:relative;
}
td img {
margin: 0 auto;
display: block;
}
<div id="bitcoin-price-space">
</div>
<div id="main-page-content">
<table align="center" width="960px" border="0">
<tbody>
<tr>
<div class="bitcoin-price-content"> <td align="center">
<h2 align="right">Test</h2>
<img src="http://dummyimage.com/200x200/000/fff" width="80%" height="275" align="center" alt=""/>
</td>
<td background=align="center">
<h2 align="right">Another Test</h2>
<img src="http://dummyimage.com/200x200/000/fff" width="80%" height="275" align="center" alt="" id="bitcoin-sell-image"/>
</td>
</tr>
</tbody>
</table>
</div>
</div>
Wrap your H2 in an absolute positioned div, don't try to make your H2 absolute. You'll need to tweak the padding based off the actual size of your image.
CSS
#main-page-content {
max-width:960px;
margin:auto;
max-height: 500px;
position: relative;
}
#bitcoin-price-space {
width: 960px;
padding-top:20px;
height: 40px;
margin:auto;
}
.bitcoin-price-content {
position: relative;
width: 100%; /* for IE 6 */
}
.bitcoin-text {
position: absolute;
padding: 80px 60px;
}
HTML
<div id="bitcoin-price-space"></div>
<div id="main-page-content">
<table align="center" width="960px" border="1">
<tbody>
<tr>
<td align="center"><div class="bitcoin-text"><h2 align="right">Test</h2></div>
<img src="data/design/images/buy-bitcoins.png" width="80%" height="275" align="center" onMouseOver="this.src='data/design/images/buy-bitcoins-hover.png'" onMouseOut="this.src='data/design/images/buy-bitcoins.png'" alt=""/></td>
<td background=align="center"><img src="data/design/images/sell-bitcoins.png" width="80%" height="275" align="center" onMouseOver="this.src='data/design/images/sell-bitcoins-hover.png'" onMouseOut="this.src='data/design/images/sell-bitcoins.png'" alt="" id="bitcoin-sell-image"/></td>
</tr>
</tbody>
</table>
</div>
Although your better alternative is to use the background image of the td...
CSS
#main-page-content {
max-width:960px;
margin:auto;
max-height: 500px;
position: relative;
}
#bitcoin-price-space {
width: 960px;
padding-top:20px;
height: 40px;
margin:auto;
}
.bitcoin-price-content {
position: relative;
width: 100%; /* for IE 6 */
}
HTML
<div id="bitcoin-price-space"></div>
<div id="main-page-content">
<table align="center" width="960px" border="1">
<tbody>
<tr>
<td align="center" style="background-image:url('data/design/images/buy-bitcoins.png')" onmouseover="this.style.backgroundImage='url(data/design/images/buy-bitcoins-hover.png)';" onmouseover="this.style.backgroundImage='url(data/design/images/buy-bitcoins.png)';">Test</td>
<td align="center" style="background-image:url('data/design/images/sell-bitcoins.png')" onmouseover="this.style.backgroundImage='url(data/design/images/sell-bitcoins-hover.png)';" onmouseover="this.style.backgroundImage='url(data/design/images/sell-bitcoins.png)';">Test</td>
</tr>
</tbody>
</table>
</div>
My layout so far for the site is as follows:
HTML
<div class="tabArea">
some more code
</div>
<table class="tablesorter">
<tbody>
some more stuff here
</tbody>
</table>
CSS
table.tablesorter{
margin:0px auto 0px;
font-family:sans-serif;
border-radius: 10px;
padding-right: 10px;
padding-left: 10px;
background-color: #F5F5F5;
width:750px;
height:400px;
}
div.tabArea {
font-weight:bold;
padding:0px;
position:relative;
text-align:center;
}
I would align the tabArea div to that it is flush on the left with the centered table. I am using text-align to center. However, the centers the div on the whole page. Moreover, if I align to the left, then it will go all the way to the left. How do I achieve this?
You'll want to use the <tr> and <td> tag when working with <tbody>, otherwise it "throws" the text out of table. For the tabArea to align correctly (to the outer left corner of the table), you'll've to put all of the content in a container. Try this:
<div id="container">
<div class="tabArea"> some more code</div>
<table class="tablesorter">
<tbody>
<tr>
<td>some more stuff here</td>
</tr>
</tbody>
</table>
</div>
.tablesorter {
font-family:sans-serif;
border-radius: 10px;
padding: 0 10px 0 10px;
background-color: #F5F5F5;
width:750px;
height:400px;
}
#container { margin: 0 auto; width: 750px;}
.tabArea { font-weight:bold; text-align: left;}
Hope this helps.
Here is the solution:
http://jsfiddle.net/pgxh6r31/
<div class="tabArea">
some more code
</div>
<table class="tablesorter">
<tbody>
<tr>
<td>
some more stuff here
</td>
</tr>
</tbody>
</table>
table.tablesorter{
margin:0px auto 0px;
font-family:sans-serif;
border-radius: 10px;
padding-right: 10px;
padding-left: 10px;
background-color: #F5F5F5;
width:750px;
height:400px;
}
div.tabArea {
width: 750px;
font-weight:bold;
padding:0px;
position:relative;
margin: auto;
border: 1px solid black;
}
table td {
border : 1px solid black;
}
I have replaced a table containing four tables (in a grid) with a div-table containing the four tables as cells. Two things that I absolutely can't seem to get to work are:
How do I get rid of the table border of the div tag using display: table?
The bottom left table insists on lining up with the far left edge of the cell and I want it to line up with the far right edge of the cell. Even relative positioning is having no impact on this one.
Here is the CSS:
<style type="text/css">
.Dashboard {
display: table;
border-collapse: collapse;
border-width: 0px;
}
.row1 {
display:table-row;
}
.row2 {
display:table-row;
height: 200px;
}
.cell1 {
display: table-cell;
padding: 2px;
border: 1px solid black;
}
.cell2 {
display: table-cell;
padding: 2px;
border: 1px solid black;
}
.cell3 {
display: table-cell;
padding: 2px;
border: 1px solid black;
text-align: right;
vertical-align: top;
}
.cell4 {
display: table-cell;
padding: 2px;
border: 1px solid black;
}
table.inner {
border-collapse: collapse;
border: 2px solid black;
text-align: center;
padding: 2px;
}
td {
border-collapse: collapse;
border: 2px solid black;
text-align: center;
padding: 2px;
}
td.image {
padding: 0;
margin: 0;
}
</style>
And the table layout looks like this:
<div runat="server" id="Dashboard" class="Dashboard">
<div class="row1">
<div class="cell1">
<table class="inner" id="t1">
<tr>...</tr>
...
<tr>...</tr>
</table>
</div>
<div class="cell2">
<table class="inner" id="t2">
<tr>...</tr>
...
<tr>...</tr>
</table>
</div>
</div>
<div class="row2">
<div class="cell3">
<table class="inner" id="t3">
<tr>...</tr>
...
<tr>...</tr>
</table>
</div>
<div class="cell4">
<table class="inner" id="t4">
<tr>...</tr>
...
<tr>...</tr>
</table>
</div>
</div>
</div>
Any advice is appreciated.
To get rid of the border use
border: none;
With the positioning, find the bottom left table id and use
float: right;
But your best option is to get rid of tables anyways. All of this can just as easily be done with straight css.