Jump to content

Pet page Coding help? (Background change)


Bibii

Recommended Posts

Hi there!

Since the background here seems to be set on "repeat", I changed the background to a small image (like in the code below), but now that I want to change to a bigger image (1280x800), the background disappears when I hit "preview" and I wonder why ;/ Also, how can I make set the background (the 1280x800 one) to fill the screen?

Thank you so much!

<style>
a {
	color: #2E72BD;
}
a:hover {
	color: #FFB300;
}
body {
	background: url("-blocked-") repeat fixed;
}
.sf, td {
	display: none;
}
#container {
	width: 350px;
	border-right: 2px #999 solid;
	float: left;
	background: #e0e0e0;
}
#img_viewer {
	margin: 0;
	padding: 0;
	list-style: none;
}
#img_viewer li {
	border: 2px #ccc solid;
	width: 28%;
	margin: 6px;
	height: 80px;
	float: left;
	overflow: hidden;
	text-align: right;
	font: 8pt Arial;
	color: #e0e0e0;
}
#img_viewer li img {
	width: 150%;
	;
	margin-top: -20%;
}
#img_viewer li div {
	top: 10px;
	left: 370px;
	padding: 10px;
	background: url("http://i.imgur.com/O6J0pT9.png") repeat;
	border: 1px #000 solid;
	display: none;
	z-index: 2;
}
#img_viewer li div img {
	margin: 0px auto 10px auto;
	width: auto;
	height: auto;
	display: block;
}
#img_viewer li:hover div {
	display: block;
}
#blurb {
	margin-left: 20px;
	border: 0px blue solid;
	float: left;
	width: 50%;
	left: 370px;
	top: 20px;
	overflow: auto;
	font: 8pt Verdana;
	line-height: 18px;
}
h1 {
	font: small-caps 24pt Courier New;
	margin: 0px;
	padding: 8px 0px;
	clear: both;
}
#container h1 {
	padding-left: 8px;
}
#blurb ul li {
	margin: 5px 0px;
	list-style: square;
}
#nav {
	font: small-caps 14pt Courier New;
	color: #999;
}
</style>

<div id="container">
<ul id="img_viewer">
<h1>
<a name="new"></a>Art gallery entries</h1>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/598639artpage5.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/598639artpage5.jpg">Featured on April 2014, Grey day ♥ This drawing looks really simple, because I did not have time to do more. I drew this during my midterms, I just had to make something for my favorite colored pets :3</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/917610artpage4.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/917610artpage4.jpg">Featured in March 2014, Scorchio day ♥ Mmh I'm more or less satisfied with this one ;/ A bit plain I believe...</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/503834artpage3.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/503834artpage3.jpg">Featured in February 2014, Lenny day ♥ I really like how this one turned out :3</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/958442artpage2.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/958442artpage2.jpg">Featured in January 2014, Elephante day ♥ I just love grey pets... adorable.</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/646841artpage1.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/646841artpage1.jpg">Featured in January 2014, Aisha day ♥
Yummy yummy yumyy</div>
</li>

<h1>
<a name="old"></a>BC Entries</h1>

<h1>
<a name="non"></a>Non Neo Related</h1>

<li>
<img><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/761004selfportraitbyjijiyeed64euoc.jpg">Self-portrait ;p</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/210184artpagenn1.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/210184artpagenn1.jpg">It's written in French, but basically, it is a quote from Breaking Dawn: Instead of "till death do us part", they changed to "as long as we both shall live". Hehe please don't hate, I was (and still am) a big fan of Twilight ♥♥</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/850650artpagenn2.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/850650artpagenn2.jpg">Those three drawing are from a serie of 12 of a calendar made for one of my best friends ♥</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/586117artpagenn3.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/586117artpagenn3.jpg">Guess who she is :3</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/756203artpagenn4.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/756203artpagenn4.jpg">Hellow cutie Josh :3</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/488467artpagenn6.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/488467artpagenn6.jpg">It was a Christmas gift ♥</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/440667artpagenn5.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/440667artpagenn5.jpg">Lovely Emma.</div>
</li>

<li>
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/829304artpagenn7.jpg"><div style="position: fixed;">
<img src="//images.weserv.nl/?url=http://img15.hostingpics.net/pics/829304artpagenn7.jpg">First time I try that kind of angle, I love how it turned out ^^</div>
</li>

</ul>
</div>
<div id="blurb" style="position: fixed;">

<div id="nav">
<a href="#new">Art gallery entries</a> | <a href="#old">BC Entries</a> | <a href="#non">Non Neo-Related</a>
</div>
<h1>Welcome to My Art Page!</h1>
<p><b>Hi there everyone! As you can see, I do not have many Neo-related art yet :C But I'm working on them *o* Especially on developing my pets' character :)
</b></p>

<h1>Currently working on: </h1>
<p>- Kittingbird's BC entry</p>
<p>- A NT comic</p>
<p>Template from <a href="/~thatkillsme">That Kills Me.</a></p>

</div>
Link to comment
Share on other sites

So that your larger background fills your screen you can change the repeat attribute to no-repeat. That piece of code will look like this:

body {
	background: url("-blocked-") no-repeat fixed;
}
Link to comment
Share on other sites

Ooh I see! Thanks a lot ! :3 I didn't know it was that straightforward.
& I found out what went wrong... I had to put the url a second time where "-blocked-" is to make it work ;o

 

Also, is there a way to make it so the background automatically fit the screen size?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...