homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

CSS height attribute

 1:50 am on May 29, 2002 (gmt 0)

I have an image that I want to repeat-y. The image needs to touch the top headers and gracefully disappear into oblivion; a divider. It is a two column layout, so when I use the background: attribute (in the body { ... }), the image falls below the columned <div>s creating a gaping space between the banner and the top of the pic. I'd like a better way to create this effect than using height: 1billion; on the rightside <div>. Since height: 100%; isn't an option quite yet, is it wrong necessarily to declare a large value with the height tag to achieve this style?




 2:31 am on May 29, 2002 (gmt 0)

Well, if the two columns have the same height you could easily apply the background to the DIV. If not, why create a separate DIV that will surround the two first, and put the background image in this DIV?

Also, have you tried setting 'padding' to '0px'?

As for your question - no it's not 'wrong' to specify a height .. Sometimes that's actually the only solution.


 2:53 am on May 29, 2002 (gmt 0)

Thanks DrDoc-

The two <div>s are based on percentages, so if I were to put the repeating image in the background it would become disassociated on different screen resolutions. I set the image to a larger z-index in order to get over the <div> tags and just extended the image that was in the banner. This example is in the profile.



 3:24 am on May 29, 2002 (gmt 0)

Nope -

Actually setting the height property to an arbitrary large number spawns a scrollbar in IE 6.0. Blasted.

Nevermind :: The page was cloaked. I'm not asking to know all about cloaking here because SEO has enough info on the subject to keep me occupied for a month. But, for some instant gratification, what metaphysical elements would cause a cloaked page to display a horizontal scrollbar in Internet Explorer?

Much thanks


 3:55 am on May 29, 2002 (gmt 0)

Well, you can always give the image a name and id (for example "theimg") and use the following JavaScript:

<script language="javascript" type="text/javascript">
window.onload = function() {
winHeight = document.all?document.body.clientHeight:window.innerHeight;
if(document.all) {
document.all['theimg'].style.height = winHeight;
else {
document.getElementById('theimg').style.height = winHeight;


 3:58 am on May 29, 2002 (gmt 0)

.. a horizontal scrollbar?


 4:24 am on May 29, 2002 (gmt 0)

Oh! That's very cool - thanks...

I've only started to learn JavaScript as of late :: Why are the 'language' and 'type' both necessary, will the 'language' validate?


 4:50 am on May 29, 2002 (gmt 0)

The language attribute specifies which scripting language is being used. You can also specify which version.

For example, setting language to "javascript1.3" would cause an older browsers to ignore the entire script (if it doesn't support the latest version).

There are also other scripting languages you could use, such as PHP, VBScript etc.

Normally you would use the shorthand <?php ?> for PHP, though, but using a script tag and set language to PHP would work as well.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved