PDA

View Full Version : any html kinda like a java 'if' statement?


kangarew
Sun 30th Nov '03, 10:49pm
I'm not claiming to really know alot about html, because I honestly don't, but I know enough to get me by.

http://www.freewebs.com/cavalcadeofcottontails
^ is what I'm working on, if help requires viewing ;)

I'm working on a website for something [dorky, so don't ask when you view it unless you want a 549108591 page explanation] and designed the whole thing at 1024 x 768 - graphics and everything. Then I took into consideration those with 800 x 600 and tested it and panicked. Half of the side graphics get cut off, everything else works fine. I have the graphics on the side purposefully set with a div to be where they are. I couldn't figure out how to get them to just ALWAYS be at the center vertically so I wrote this and it worked but only on 1024 res:

<style type="text/css" media="screen">
<!--
#sideLights
{
left:0px;
position: absolute;
margin-top: 53px;
bottom: 93px;
width: 60px;
height: 420px;
visibility: visible;
}
--></style>
</head>
<body>
<div id="sideLights">
<img src="http://www.freewebs.com/cavalcadeofcottontails/outerGraphics/leftLights2.jpg">

It's basically the same thing for both sides.

I know java pretty well and was thinking of something like an if statement, if res=1024 then set the image this way, else just post it (because on 800x600 without setting the margin up that high, by just putting img src = and not even using a div it looks fine). But trying to fix this is beyond my html knowledge.

Any pointers to just get it to float in the middle no matter what the screen size is? I can get them to do that horizontally, but not vertically.

-- Roxie

kangarew
Sun 30th Nov '03, 10:51pm
By the way freewebs.com is a terrible server (well der, it's free) so it takes ages to load, I'm sorry. For Christmas I'm finally buying myself a domain and reliable server.

-- Roxie