Staredit Network > Forums > Technology & Computers > Topic: HTML/CSS website help
HTML/CSS website help
Aug 28 2009, 9:58 pm
By: sharf  

Aug 28 2009, 9:58 pm sharf Post #1



Ok, so the idea for my page is to have two images on either side of the content of the page. These images shouldn't repeat, and should be fixed when you scroll. To accomplish this I've got two table cells on either side of the content, and have the tables having background images, that are not repeated, and fixed. It works. The problem is, when I set them to be fixed, the right cell, with the right border, is pushed way off center. As soon as I turn off the fixed position, it centers right.

Here's my code:
Quote
<title>Untitled Document</title>
<style type="text/css">
<!--
html, body, #body, #background1, #background2 {
height:100%;
margin: 0;
padding: 0;
border: none;
}
#body {
margin: 0 auto;
text-align: left;
}
#background1 {
background-image: url(leftguy.png);
background-repeat: no-repeat;
position: fixed;
}
#background2 {
background-image: url(rightguy.png);
background-repeat: no-repeat;
position: fixed;
}
a:link {
color: #009966;
}
a:visited {
color: #00CC33;
}
body {
background-color: #000000;
}
-->
</style></head>

<body>
<table width="800" height="475" border="0" align="center" cellpadding="0" cellspacing="0" id="body">
<tr>
<td width="140" valign="top" id="background1"> </td>
<td><p> </p>
</td>
<td width="140" valign="top" id="background2"> </td>
</tr>
</table>
</body>
</html>
Thanks, sharf



None.

Aug 28 2009, 10:05 pm Jack Post #2

>be faceless void >mfw I have no face

I have code on my other comp that makes a stationary background image, that stays when you scroll. Is that what you want?



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Aug 28 2009, 10:07 pm sharf Post #3



the trick is the background is not in the body, like a page background. That's simple. What I need, is a background for a particular cell, to be stationary when you scroll. I have accomplished that. But in doing so, the table is pushed off center. However when I take out the postion: fixed; from the CSS, it re aligns properly, IE and FF both have this issue, and I can't figure out why.

And uppon messing with settings trying to get something, it turns out that any text or content in the main cell, between the two side images, are left aligned to the whole page, not the cell, so they are way off from where they should be...hmm....

Post has been edited 1 time(s), last time on Aug 28 2009, 10:15 pm by sharf.



None.

Aug 28 2009, 10:19 pm Jack Post #4

>be faceless void >mfw I have no face

I don't know enough then sorry.



Red classic.

"In short, their absurdities are so extreme that it is painful even to quote them."

Aug 29 2009, 7:17 am Syphon Post #5



Do not use tables for this.



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[08:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
[11:31 pm]
Vrael -- :wob:
[08:42 pm]
Ultraviolet -- :wob:
[2024-5-08. : 10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[2024-5-08. : 10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
[2024-5-06. : 3:04 am]
Ultraviolet -- Vrael
Vrael shouted: I almost had a heart attack just thinking about calculating all the offsets it would take to do that kind of stuff
With the modern EUD editors, I don't think they're calculating nearly as many offsets as you might imagine. Still some fancy ass work that I'm sure took a ton of effort
Please log in to shout.


Members Online: 1adriane4622gL5, dywan