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.
[10:53 pm]
Oh_Man -- https://youtu.be/MHOZptE-_-c are yall seeing this map? it's insane
[2024-5-04. : 1:05 am]
Vrael -- I won't stand for people going around saying things like im not a total madman
[2024-5-04. : 1:05 am]
Vrael -- that's better
[2024-5-04. : 12:39 am]
NudeRaider -- can confirm, Vrael is a total madman
[2024-5-03. : 10:18 pm]
Vrael -- who says I'm not a total madman?
[2024-5-03. : 2:26 pm]
UndeadStar -- Vrael, since the ad messages get removed, you look like a total madman for someone that come late
[2024-5-02. : 1:19 pm]
Vrael -- IM GONNA MANUFACTURE SOME SPORTBALL EQUIPMENT WHERE THE SUN DONT SHINE BOY
[2024-5-02. : 1:35 am]
Ultraviolet -- Vrael
Vrael shouted: NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
Gonna put deez sportballs in your mouth
[2024-5-01. : 1:24 pm]
Vrael -- NEED SOME SPORTBALL> WE GOT YOUR SPORTBALL EQUIPMENT MANUFACTURING
[2024-4-30. : 5:08 pm]
Oh_Man -- https://youtu.be/lGxUOgfmUCQ
Please log in to shout.


Members Online: Oh_Man, Roy