Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 08:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Background-color

Discussion on Background-color within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
DerSaboteur's Avatar
 
elite*gold: 25
Join Date: Jul 2008
Posts: 425
Received Thanks: 28
Background-color

Hey Epvper

Hab da ein kleines problem ich möchte das mein Background auf der seite halb schwarz und halb weiß ist.. das habe ich soweit hin bekommen mit..

Code:
body {
    background: linear-gradient(90deg, white 50%, black 50%);
}
so dies sollte eig nur die height von 150px haben und danach wieder komplett weiß..



Mfg DerSaboteur

€dit: HTML und CSS code bisher

HTML :
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thomas-Photography</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
</head><body>
<div id="wrapperarea">
    <div id="header">
        <a href="index.htm"><img src="img/header.png" alt="img_header" /></a>
    </div>
</div>
</body></html>
CSS:
Code:
@charset "utf-8";
* {
    margin: 0px;
	padding: 0px;
	font-family: Georgia;
	font-size: 12px;
	line-height: 1.5;
}
body {
    background: linear-gradient(90deg, white 50%, black 50%);
}

#wrapperarea {
	width: 1017px;
	margin-right: auto;
	margin-left: auto;
}
#wrapperarea #header {
 height: 750px;
}
DerSaboteur is offline  
Old 09/05/2015, 15:28   #2
 
elite*gold: 0
Join Date: Jun 2009
Posts: 593
Received Thanks: 109
im Moment gibts du ja deinem Body den gradient als Eigenschaft, der Body umschließt den gesamten Content weshalb die komplette Seite den Hintergrund bekommt. Außerdem ist auch noch gar keine Höhe in deinem css definiert, am besten du versuchst mal den background auf den header zu legen und eine Höhe zu definieren.
sven12345 is offline  
Old 09/05/2015, 15:34   #3
 
DerSaboteur's Avatar
 
elite*gold: 25
Join Date: Jul 2008
Posts: 425
Received Thanks: 28
Das problem ist das ich den header in dem #wrapperarea habe damit die seite quasi immer auf 1017px bleibt.. setze ich den header aus dem div container #wrapperarea schiebt sich das bild nach links und wenn ich es mittig ausrichte muss ich es einem width geben.. und dann bekomme ich trz. nicht das was ich will.. habe auch schon mind. 2 jahre nichts mehr mit html und css allgemein homepages gemacht..
DerSaboteur is offline  
Old 09/05/2015, 16:41   #4
 
elite*gold: 0
Join Date: Jun 2009
Posts: 593
Received Thanks: 109
dann mach einfach ein div drüber außerhalb von der wrapperare mit width: 100% (position: absolut), dem gradient und der höhe, dann sollte das gehen - falls nicht kann sein das du ein bisschen mit dem z-index rumspielen musst
sven12345 is offline  
Old 09/05/2015, 18:17   #5
 
DerSaboteur's Avatar
 
elite*gold: 25
Join Date: Jul 2008
Posts: 425
Received Thanks: 28
also ich hab das jetzt so wie ich es haben wollte.. hab jetzt einfach um das img. ein <center> gesetzt was ich eig vermeiden wollte..
DerSaboteur is offline  
Old 09/05/2015, 19:38   #6
 
.SkyneT.'s Avatar
 
elite*gold: 273
Join Date: Sep 2010
Posts: 1,831
Received Thanks: 786
Quote:
Originally Posted by DerSaboteur View Post
also ich hab das jetzt so wie ich es haben wollte.. hab jetzt einfach um das img. ein <center> gesetzt was ich eig vermeiden wollte..
Nur zur Beruhigung, die seite "google.com" verwendet auch <center> tags
.SkyneT. is offline  
Reply


Similar Threads Similar Threads
Help, changing Background color of this window
04/03/2013 - Flyff Private Server - 5 Replies
Help, changing Background color of this window. A help would be much appreciated. Thanks in advance good people of Elitepvpers. http://i46.tinypic.com/okrhac.jpg http://i46.tinypic.com/okrhac.jpg
[Source] Move mouse to specific color on screen (color aimbot)
11/20/2012 - .NET Languages - 0 Replies
I was initially calling GetPixel in a loop to scan a screenshot for a specific RBG which caused a 2-3 delay before finding the color until I realized it's much faster to use LockBits and UnlockBits instead. Anyway, here's my source for finding a specific RBG color on your screen and then automatically moving the mouse to that color which is good for browser shooting games and what not. Compiled in vs2010. Imports System.Drawing.Imaging Imports System.Runtime.InteropServices
Help for Detecting a Cirlce Shape same color as the background
09/01/2012 - AutoIt - 4 Replies
http://godswarhacks.files.wordpress.com/2012/08/ci rcle.jpg As What you can see in the image above i need to detect the circle shape but the problem is its the same color as the background so i can't detect it. This is the code i use : #cs -------------------------------------------------- -------------------------- AutoIt Version: 3.3.0.0 Author: Chris10Lyn Symbianize #ce -------------------------------------------------- --------------------------
WoW Color Hack (Use color-codes in text)
09/23/2007 - WoW Exploits, Hacks, Tools & Macros - 31 Replies
WoWColorHack.flt -=Preamble=- I'm quite surprised that no one has released anything similar yet - the theory behind this dates back to the alpha days. Hell, I first used this filter on my own alpha sandbox. -=Theory=-



All times are GMT +1. The time now is 08:40.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.