Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Converting a content box from tables to css.
Old 08-12-2009, 02:36 AM Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
I'm trying to make it so that the box has the ability to move for different sized screen res's.

So far I've got the top and the bottom images working up to 1660 width... that's as large as I can test.

I don't have an idea how to get the side images in place. I've tried all kinds of things and no luck. I think i'm going to sleep on it and see if it looks any better when I wake up.

If you have any ideas i'd love to try them.

http://www.pgzz.gamerunion.com

my css code

Code:
#container{
        width: 100%;
        margin: auto;
        }
        .content_box {
        margin-left: 30px;
        margin-right: 30px;
}
.box{
    height: 70px;
    overflow: hidden;
    background: #fff url(images/r1_c3.jpg) top right no-repeat;
}
    .box div{
        width: 600px;
        height: 70px;
        overflow: hidden;
        background: #fff url(images/r1_c1.jpg) top left no-repeat;
    }

.content{
    background: url(images/b__05.png) repeat;
    padding: 20px 20px 20px; 
    clear: both;
    margin-left:100px;
    margin-right: 100px;
    }

.footer{
    height: 70px;
    overflow: hidden;
    background: #fff url(images/r3_c3.jpg) bottom right no-repeat;
    clear: both;
    margin-bottom: 30px;
    margin-left: 30px;
    margin-right: 30px;
}
    .footer div{
        width: 600px;
        height: 70px;
        overflow: hidden;
        background: url(images/r3_c1.jpg) left bottom no-repeat;
    }
Thanks for the advice!
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
 
Register now for full access!
Old 08-12-2009, 12:25 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
Can anyone see why i lost my content?

I got the side images up but they are not repeating like they should and all the text in the box is gone.

Can you see what I need to change?

Code:
#container{
        width: 100%;
        margin: auto;
        }
        .content_box {
        margin-left: 30px;
        margin-right: 30px;
}
.box{
    height: 70px;
    overflow: hidden;
    background: #eff1c0 url(images/r1_c3.jpg) top right no-repeat;
}
    .box div{
        width: 800px;
        height: 70px;
        overflow: hidden;
        background: #eff1c0 url(images/r1_c1.jpg) top left no-repeat;
}

.content{
    background: url(images/rr.jpg) center right repeat-y;
    clear: both;
    height: 20px;
    overflow: hidden;
    margin-right: 29px;
}
    .content div{
        background: url(images/ll.jpg) center left repeat-y;
        width: 800px;
        height: 20px;
        overflow: hidden;
        margin-left: 29px;
}
.footer{
    height: 70px;
    overflow: hidden;
    background: #eff1c0 url(images/r3_c3.jpg) bottom right no-repeat;
    clear: both;
    margin-bottom: 30px;
    margin-left: 30px;
    margin-right: 30px;
}
    .footer div{
        width: 800px;
        height: 70px;
        overflow: hidden;
        background: url(images/r3_c1.jpg) left bottom no-repeat;
    }

Thanks for the help
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-12-2009, 04:06 PM Re: Converting a content box from tables to css.
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Well, your content div only has a height of 20px!

Quote:
.content {
background:transparent url(images/rr.jpg) repeat-y scroll right center;
clear:both;
height:20px;
margin-right:29px;
}
Remove the height, or put in a min-height (which won't work for IE6).
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-12-2009, 04:33 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
LadynRed you are my hero!!!!


Thanks for the help I thought that was the height of the images I was using not the div its self.

It's looking good I just need to fingure out how to patch up the gaps and it should be good.

http://www.pgzz.gamerunion.com/
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-12-2009, 04:45 PM Re: Converting a content box from tables to css.
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
For the gap at the top, caused by margin collapse (not a bug), add padding-top: 1px to the <div> holding your text.

The bottom gap is coming from the default margin on your <p> tags. To kill that gap, add padding-bottom: 25px; to that same div. You can vary that number to suit your layout.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-12-2009, 05:23 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
Thank you so much!!! <Hugs>
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-12-2009, 10:20 PM Re: Converting a content box from tables to css.
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You're very welcome
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 08-13-2009, 06:55 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
I've found a little snag in my box. It breaks on screen res's wider than 1600px.

The guy that pointed it out to me has a screen res of 2560x1600. I changed the images so my sliding door effect opens to 2560px with no problem but now it breaks on small screen res's.

So I think i'm in need of another way to make the box all together.

Do you know of any guides for making a css box with images and borders?

Everything i've found so far uses background colors in places that I need to use images and I can't figure out how to edit the code to allow the box to be flexible in width and height with all of my images.

Any ideas?
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-13-2009, 07:34 PM Re: Converting a content box from tables to css.
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 8,936
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
How does it break? Most people aren't going to be using greater than 1600x1200, btw.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 08-13-2009, 07:41 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
It breaks down the middle like this






I've got an 800px image on the right and one on the left. So any res over 1600w breaks it.
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-13-2009, 11:14 PM Re: Converting a content box from tables to css.
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 8,936
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
If you had an image posted there, it isn't showing.

I've been taking a look at it, but I'm still a bit thrown off by your menu; it's all out of whack. I hope you saved a copy of the old version before the modifications. If you have, roll it back and let's see what we can do to help you with it.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 08-13-2009, 11:32 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
Yep i did.

www.pgzz.gamerunion.com/test.html

I'm just looking for good clean code. I built this by picking though 3 different guides that didn't do everything I needed them to and then played around with it until i started to look like a box.

I haven't been able to find a guide that lets me use images for corners and top, bottom, and side borders.

here's a look at my css code

Code:
#container{
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        margin-top: 100px;
}
        .content_box {
        margin-left: 84px;
        margin-right: 84px;
}
.box{
    height: 100px;
    overflow: hidden;
    background: #eff1c0 url(images/r1_c3.jpg) top right no-repeat;
}
    .box div{
        width: 800px;
        height: 100px;
        overflow: hidden;
        background: #eff1c0 url(images/r1_c1.jpg) top left no-repeat;
}

.content{
    background: url(images/rr.jpg) center right repeat-y;
    clear: both;
    margin-right: 84px;
    margin-left: 84px;
}
    .content div{
        background: url(images/ll.jpg) center left repeat-y;
        width: auto;
        padding-top: 1px;
        padding-bottom: 25px;
}
.footer{
    height: 100px;
    overflow: hidden;
    background: #eff1c0 url(images/r3_c3.jpg) bottom right no-repeat;
    clear: both;
    margin-bottom: 30px;
    margin-left: 84px;
    margin-right: 84px;
}
    .footer div{
        width: 800px;
        height: 100px;
        overflow: hidden;
        background: url(images/r3_c1.jpg) left bottom no-repeat;
}
__________________

Please login or register to view this content. Registration is FREE

Last edited by Snot; 08-13-2009 at 11:39 PM..
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-14-2009, 10:35 AM Re: Converting a content box from tables to css.
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 8,936
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
I can't reproduce it, but my monitor doesn't go over 1600x1200. Sounds like it's trying to break it in half for multiple monitors. Since your layout probably shouldn't extend past 1600 anyway, put in a max-width:1600px; on your body and container div. That will work on everything but IE6 and early builds of IE7. I seriously doubt that many using those will be using larger than 1600, but if you worry about that put in a conditional comment fix for those.

Soon, on to the menu....

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 08-14-2009, 02:52 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
Sweet!!! I didn't think of doing that.

I've added it to both the box and the body but I have a question. I have a repeating tile image in my body tag that's the background for my whole page. Would that repeating tile image stop at 1600px wide if I have that code in the body?
I've got 2 images in the header of my page what need to repeat off the screen as well.

Couldn't I just add the code to my box and not the body? I think it would do the trick but I need to find someone with a huge screen res to test it.

here's a new link. I've made alittle progress on the navbar.

http://www.pgzz.gamerunion.com
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Old 08-14-2009, 04:41 PM Re: Converting a content box from tables to css.
serandfae's Avatar
Do the "Evil Nanner" !!!

Posts: 8,936
Name: Tim Daily
Location: Apex, NC, US, Sol 3
Trades: 0
Quote:
Originally Posted by Snot View Post
Sweet!!! I didn't think of doing that.
...
Couldn't I just add the code to my box and not the body? I think it would do the trick but I need to find someone with a huge screen res to test it.
In a word, yes.
Quote:
Originally Posted by Snot View Post
here's a new link. I've made alittle progress on the navbar.

http://www.pgzz.gamerunion.com
Looks like you're shaping this thing up pretty well.

tim
__________________
SEO "experts" smell like Big Fish_|_
Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

serandfae is offline
Reply With Quote
View Public Profile Visit serandfae's homepage!
 
Old 08-14-2009, 07:29 PM Re: Converting a content box from tables to css.
Snot's Avatar
Super Talker

Posts: 132
Name: Chase
Trades: 0
Yea I'm trying to. My code is not very clean and i'm looking into better ways to do it without having so much going on.
__________________

Please login or register to view this content. Registration is FREE
Snot is offline
Reply With Quote
View Public Profile Visit Snot's homepage!
 
Reply     « Reply to Converting a content box from tables to css.
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.41827 seconds with 12 queries