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.
[2026-7-18. : 2:27 am]
Symmetry -- https://staredit.net/topic/18903/ THE REVIEWS ARE HERE! "ok these are pretty good memes" - ssj9Kevin
[2026-7-17. : 2:58 pm]
Ultraviolet -- Symmetry
Symmetry shouted: Man I wish we had this tech back in the day when people played ums lmao
fr fr
[2026-7-17. : 2:39 am]
Symmetry -- Man I wish we had this tech back in the day when people played ums lmao
[2026-7-16. : 6:28 am]
NudeRaider -- EUD actions, specifically. The conditions remained. Today we can even have actions again, but they're all virtualized/whitelisted (not sure on the actual technical implementation) so you can only use them for specific intended purposed, not arbitrary code injections.
[2026-7-16. : 6:26 am]
NudeRaider -- I mean yes, maps - through EUDs - were theoretically able to do that as well, but that was patched quickly.
[2026-7-16. : 6:25 am]
NudeRaider -- Symmetry
Symmetry shouted: Ohhh imagine a SC map that could delete itself
not the map, the editor
[2026-7-16. : 2:28 am]
Symmetry -- I vaguely remember Voy doing some ACE back in the day, but I had no idea EUDs could do that kind of shit. I am very much catching up on the technology
[2026-7-16. : 2:28 am]
Symmetry -- Ohhh imagine a SC map that could delete itself
[2026-7-15. : 8:51 pm]
NudeRaider -- Symmetry
Symmetry shouted: NudeRaider Is EUD editor capable of writing shit onto the player's harddrive? That seems like it would be dangerous
yeah an editor that isn't allowed to write files sounds rather pointless, so I'd assume it can. Like most other programs too btw. and yes, obviously that's dangerous, but also kinda necessary. MS introduced that virtualization for exactly that reason.
[2026-7-15. : 4:10 am]
Ultraviolet -- I don't think so. I think they shut that shit down after 1.16, maybe even earlier
Please log in to shout.


Members Online: Moose