Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-30-2013, 04:18 PM   PM User | #1
jeddi
Senior Coder

 
Join Date: May 2006
Posts: 1,513
Thanks: 26
Thanked 4 Times in 4 Posts
jeddi has a little shameless behaviour in the past
Image Display Problem ( expanding !! )

Hi,

My page contains a header image and is displayed
with this CCS code:

Code:
header, footer {
	display:block;
	width:1060px;
	margin:0 auto;
	}

header {
	height:200px;
	background: blue;
	border-radius:0px 0px 12px 12px;
	-moz-border-radius:0px 0px 12px 12px;
	-webkit-border-radius:0px 0px 12px 12px;
	}
	
header section {
	display:block;
	width:1000px;
	height:150px;
	background: url(http://professional-world.com/images/trees.jpg ) no-repeat center center fixed;
	-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
	opacity:0.8;
	-moz-opacity:0.8; 
	-webkit-opacity:0.8;
	padding:20px;
	margin:0 0;
	margin-left:10px;
	border-radius:0px 0px 12px 12px;
	-moz-border-radius:0px 0px 12px 12px;
	-webkit-border-radius:0px 0px 12px 12px;
}
And this HTML:

Code:
	<header>
		<section>
			<h1>Auto World</h1>
			<h2>The Maddest Auto Community</h2>
		</section>
	</header>
The header image is an avenue and I have displayed it with
the regulat <img> tag on my page as well.

My Page


Full coding can be seen there as well.


The image seems to be getting "zoomed in"
Can anyone see what I have got wrong ?



Thanks
__________________
If you want to attract and keep more clients, then offer great customer support.

Support-Focus.com. automates the process and gives you a trust seal to place on your website.
I recommend that you at least take the 30 day free trial.
jeddi is online now   Reply With Quote
Old 01-30-2013, 04:40 PM   PM User | #2
jerry62704
Senior Coder

 
jerry62704's Avatar
 
Join Date: Oct 2007
Location: Springfield, IL
Posts: 1,046
Thanks: 9
Thanked 81 Times in 81 Posts
jerry62704 is on a distinguished road
Which image? Auto World, Family Fitness or the trail?

Family Fitness looks distorted to me, is that the way you wanted it to look?
__________________
.
.
...and gladly would he learn and gladly teach

Visit www.LiberalsWin.com for humor and the unique Bush/Obama Approval Polls
jerry62704 is offline   Reply With Quote
Old 01-30-2013, 05:27 PM   PM User | #3
jeddi
Senior Coder

 
Join Date: May 2006
Posts: 1,513
Thanks: 26
Thanked 4 Times in 4 Posts
jeddi has a little shameless behaviour in the past
Sorry is I wasn't clear.

It is not the banner images.

It is the one in the header section
which is http://professional-world.com/images/trees.jpg

In the header section is should display as a background image


I displayed it again towards the bottom of the page
using normal <img> tag. This is show what it should be
looking like in the header section.

The version of the image in the header section appears to be "zoomed in"
and only showing some of the actual image.


Hope someone can see what the problem is


.
__________________
If you want to attract and keep more clients, then offer great customer support.

Support-Focus.com. automates the process and gives you a trust seal to place on your website.
I recommend that you at least take the 30 day free trial.
jeddi is online now   Reply With Quote
Old 01-31-2013, 12:46 PM   PM User | #4
jeddi
Senior Coder

 
Join Date: May 2006
Posts: 1,513
Thanks: 26
Thanked 4 Times in 4 Posts
jeddi has a little shameless behaviour in the past
I have taken the other images off the page now.

So the only two images are in fact the same image.

The top one in the header should be looking like the
one below - not sure why it is sort of zoomed in looking ??


My Page




.
__________________
If you want to attract and keep more clients, then offer great customer support.

Support-Focus.com. automates the process and gives you a trust seal to place on your website.
I recommend that you at least take the 30 day free trial.
jeddi is online now   Reply With Quote
Old 01-31-2013, 03:01 PM   PM User | #5
abduraooft
Supreme Master coder!

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: N/A
Posts: 14,680
Thanks: 158
Thanked 2,182 Times in 2,169 Posts
abduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really niceabduraooft is just really nice
What's the purpose of
Code:
-webkit-background-size: cover;
	-moz-background-size: cover;
	-o-background-size: cover;
	background-size: cover;
in your CSS ?
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 01-31-2013, 04:05 PM   PM User | #6
jeddi
Senior Coder

 
Join Date: May 2006
Posts: 1,513
Thanks: 26
Thanked 4 Times in 4 Posts
jeddi has a little shameless behaviour in the past
Hi,

Thanks for looking.

I think that code stretches the image to fit the
width and height dimensions that you give the
block , in this case width:1000px; height:150px;

So if an image is only 800px wide it will get resived to "cover"
the area.

Of course I might be using it incorrectly


.
__________________
If you want to attract and keep more clients, then offer great customer support.

Support-Focus.com. automates the process and gives you a trust seal to place on your website.
I recommend that you at least take the 30 day free trial.
jeddi is online now   Reply With Quote
Old 02-02-2013, 07:01 AM   PM User | #7
jeddi
Senior Coder

 
Join Date: May 2006
Posts: 1,513
Thanks: 26
Thanked 4 Times in 4 Posts
jeddi has a little shameless behaviour in the past
Hi

- I am still having problem with this

I took out this css:

Code:
background-size: cover;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;

- BUT leaving in the image code line:
Code:
background: url(http://professional-world.com/images/body_bk_image.jpg) no-repeat center center fixed;
But the image just did not show up at all

So I put it back in again !


I must have one of the settings wrong as the imaged is being stretched for some reason,
probably it is something to do with the cover element , or maybe it
is the center center fixed; part of the ccs code

This is where you can see the problem:

My site


Any ideas ?


.
__________________
If you want to attract and keep more clients, then offer great customer support.

Support-Focus.com. automates the process and gives you a trust seal to place on your website.
I recommend that you at least take the 30 day free trial.
jeddi is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 11:38 AM.


Advertisement
Log in to turn off these ads.