PDA

View Full Version : CSS Question



billbenson
03-05-2009, 04:14 PM
Does anybody know how to do two color borders? For a three column design I want the left column to have a very thin border between it and the center content section. I want the border to be a blueish on the very outside with a redish color inside of that. Each about 1 pixel or so wide. So there are actually two borders touching one directly inside of the other.

vangogh
03-05-2009, 04:31 PM
I'm not 100% sure what you want to do.

Is the left column going to have this same border on all four sides? If so you'll want to wrap another div around what you already have. Then set the outer border on this new wrapper div and the inner border on the existing container div.

If the two borders are only going to be on one side between the column and the center content I'd probably set one border on the column and the other border on the center content.

There's more than one way to do this. It depends on how you have your html structured. The basic idea is one element gets one border. You can place that border on any or all of the 4 sides, but you can't place 2 borders on the same element. So you need to have the reddish border on one element and the blueish border on another element. Which two elements depends on the rest of your code.

billbenson
03-05-2009, 05:07 PM
I've been searching. I was hoping there was a color option for two different colors on the same border, but I can't find one. Certainly your border for the center section and border for the left would work for a vertical line. Div would work for the whole column. I'm not sure what I want at this point, I want to see what it looks like. I'll play with it tonight.

vangogh
03-05-2009, 05:17 PM
Unfortunately it's one color per border. You could have the right and left border be different colors, but you can't have two colors on the right border.

The easiest thing might just be to wrap the extra div around what you have now and add one of the borders to the extra div.

rezzy
03-05-2009, 05:45 PM
Unfortunately it's one color per border. You could have the right and left border be different colors, but you can't have two colors on the right border.

The easiest thing might just be to wrap the extra div around what you have now and add one of the borders to the extra div.

If you want to do it with CSS. I think thats the best way. Unless you want to use an image, that would allow you the flexibility to do this.

Spider
03-05-2009, 09:20 PM
It would be easy to do with tables :eek:



Ooops! I shouldn't have said that! :D

vangogh
03-05-2009, 10:58 PM
Funny. I have to give you 10 demerits now :)

It's easy to do with css too. It's hard to give a specific answer though without seeing Bill's code, but the basic idea is to add a 1px red border to one element and a 1px blue border to a neighboring element. How he has the html structured will be what decides which elements gets which border and if a new element like a wrapper div is needed.

billbenson
03-05-2009, 11:41 PM
Its a zen cart site. I couldn't find a template I like, so I'm modifying the closest thing I found. I'll probably try your dual div approach VG. I'm still going back and forth between source and the css to figure out what does what.

I'm having fun. I haven't built a site from scratch in a long time (if you want to consider using a cms building a site from scratch). I have been spending most of my design time hacking an old oscommerce site and building admin tools for managing it and do other things I need.

BTW Spider, I'm really really really looking forward to getting away from the tables I have been dealing with in oscommerce.

Oh, VG, I still haven't tripped over anything that indicates you can set the SSL from admin. Since it was built on the basic oscommerce structure, it's probably not possible. In fact I believe you get errors if the config file where it is writable. I'm only using it because the conversion from oscommerce is much easier. I'm still curious what the best open source cart solution is today. I'd like to hear from someone who has used the wp plugin.

Also, VG, since you said you were going to be working on a zen site, I couldn't find any SEO plugins that looked like they would be worthwhile, so I'll probably hack something. If you run across any, please post it.

rezzy
03-05-2009, 11:46 PM
BTW Spider, I'm really really really looking forward to getting away from the tables I have been dealing with in oscommerce.

Its always a good feeling when you can erase tables and place divs.

vangogh
03-06-2009, 01:30 AM
Bill I haven't done much design work with Zen Cart. It's been more programming to this point. Same for the SEO. It's the php/mysql part that fell to me. I will let you know if I find anything out though.

I'm not sure there is a best shopping cart. It depends on what you're familiar working with and how else your site is built. Since I work so much with WordPress I'd probably lean toward one of the WP cart plugins, but it's more to do with my liking WordPress than knowing the plugins are better than any other cart out there.

vangogh
03-07-2009, 11:47 PM
Bill I just came across this post, 37 Shopping Cart Options for Developers (http://vandelaydesign.com/blog/web-development/ecommerce/). Thought you might be interested.

billbenson
03-08-2009, 03:20 PM
Took a quick look at it VG. Thanks. I read one review on the WP ones. It didn't look that great. Glancing through, nothing caught my eye that appeared to be any better than zen, at least for free. Pete always liked cubcart which is on your list. I think that is primarily because of ease of the initial installation, not features though.

some of the pay carts may be ok; dunno. I don't want to go either the pay cart or asp route. Don't really feel like learning asp at this juncture.

It does seem like there is a void of really good free open source carts though.

vangogh
03-08-2009, 06:53 PM
I've generally heard good things about the WordPress ones, but maybe it's because I know quite a few people who work with WordPress. Heard some good things about Magento too. There's likely something on the list you'd like, though maybe you'll end up liking Zen Cart the best anyway.

billbenson
03-11-2009, 03:17 PM
As far as liking Zen, sometimes the devil you know is the best solution. That's what will probably happen unless another obviously better cart comes along. I like to standardize on things. Keeps everything simpler.

vangogh
03-11-2009, 03:53 PM
Understandable. If it's easier for you to work with Zen Cart because you're familiar with it then you can develop quicker for it. Still worth checking into other carts. One or more might not have a huge learning curve and within a month or so may be easier to work with.

billbenson
03-15-2009, 01:26 AM
So, I've been trying for two weeks to change the color of some text in the Zen Cart css. Really frustrated. What should be changing the color isn't. About to send VG an email...

Then today I tried changing the font in the same place I thought the color should be set. The font changed and the color I wanted was there.

What was going on? I'M COLOR BLIND! Only for certain grades of colors. I can tell this color in larger text but in smaller text, I can't. It rarely crops up as a problem. Only in certain shades of redish brown. Chased my tail for a couple of weekend days on this when the problem was my eyes!

vangogh
03-15-2009, 01:06 PM
I'm not sure whether to say sorry or laugh a bit. I'll go with sorry for the frustration though it is kind of humorous now that you figured out what was going on. I guess in the future when you're changing certain colors you need to ask someone else to take a look. I'm sure it's been a frustrating two weeks, but I'm glad you realized what the problem was.

billbenson
03-15-2009, 03:39 PM
Ya, I posted because I thought it was kind of amusing in retrospect. Not the first time I chased my tail with code either.