 |
Threads: 21,763
Posts: 83,205
Members: 24,315
|
 |
|
Web Hosting |
General Web Hosting
Platform Based Hosting
Programmer's Hosting
Special Need's Hosting
Web Hosting Resources
|
|
|
 |
|
|
 |

28 Oct 2009, 05:27 AM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
|
Background-color & Background-image issue
Hi,
I have a background-image at the top of a div, then i've chosen a background colour identical to the image colour so as the list inside the div expands downwards the colour will follow it.
Now my problem is that the top of this image is jaged and so the background colour apears between these jaged edges which is transparent and so i need to some how push the background colour down a few pixles so it wont show at the top.
Any ideas?
Thanks in advance.
Sol.
|

28 Oct 2009, 06:20 AM
|
 |
Established Member
|
|
Join Date: Aug 2009
Posts: 86
|
|
|
Is it available online so we can see the code and whats going on exactly?
|

28 Oct 2009, 06:38 AM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
|
i'm afraid not, it's simply and image over a coloured background, and all i need is for the top of the image to be slightly higher then the background colour.
example:
#
{
background-color: #0177C1;
background-image: url(../../pics/recent_comments.png);
border: none;
background-repeat: no-repeat;
}
|

28 Oct 2009, 06:55 AM
|
|
Newbie
|
|
Join Date: Oct 2009
Posts: 9
|
|
|
Cant you just just the background colour of the image from transparent to whatever colour you want to show?
|

28 Oct 2009, 07:01 AM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
|
unfortunately the main background is not a solid colour and so i can't really do that.
|

28 Oct 2009, 07:08 AM
|
|
Newbie
|
|
Join Date: Oct 2009
Posts: 9
|
|
|
Sorry Im not sure what you mean, do you have a screenshot?
It sounded as if you had an image which is jaggered and the blank space is set to transparent so shows through the background colour of the webpage below, but you dont want to see this colour? Therefore what colour do you want to see instead in the jaggered space?
from your CSS the background colour is solid: background-color: #0177C1
|

28 Oct 2009, 07:11 AM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
|
oh sorry i thought i explained it, you see i have the main background which is a repeated image. I then have a side panel and there is a div on the side that has it's own background colour but an image placed over the top of it. Now this image has a jagged top which i want to keep transparent but the background colour of this div comes through.
I think an image will be describe it, i'll get you one in a sec.
|

28 Oct 2009, 07:21 AM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
Here we are:
Screen1 is with the background:
Screen2 is without the background colour and how i want it to apear:
Thanks for the help.
|

28 Oct 2009, 07:24 AM
|
|
Newbie
|
|
Join Date: Oct 2009
Posts: 9
|
|
|
Ah I know what you mean now, you dont want the background colour of the div to show, but the background colour (gradient) of the main page background to show through.
Think the ways to do this would be to slice the same part of the gradient where it appears on the background and make it the background of the jaggered image.
Or created a spereate div that will hold the very top part of the background image (the jaggered part) and set the background to transparent on this bit, then put the rest of the background image fading into the div colour in the div below.
|

28 Oct 2009, 07:27 AM
|
|
Newbie
|
|
Join Date: Oct 2009
Posts: 9
|
|
|
Edit: after seeing the image where it looks like a pattern in the background, you would be better off slicing the jaggered part of the image and putting it in its own div with a transparent bg then creating ajoining div below with a red bg.
|

28 Oct 2009, 09:06 AM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
Ah that's what i thought, but didn't want to do that
Thanks for the help PHiL, i'll let you know if i can get a work around otherwise i'll be making that seperate div.
Thanks again,
Sol.
|

28 Oct 2009, 12:07 PM
|
|
Established Member
|
|
Join Date: Oct 2009
Location: UK
Posts: 34
|
|
Ah ha! i cheated
i removed the background color and selected the div that was inside that held the text.
I increased it's margins and set it's background colour to the colour i wanted. It's perfect now
Thanks for the help though!
Sol.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:23 PM.
|