/    Sign up×
Community /Pin to ProfileBookmark

THis is a bit html and a bit css

I have a div in a table.

[CODE]<div class=”box-left”>[/CODE]

and i have this css:

[CODE]#all .box-left {margin: 0; padding: 0; background: url(‘images/table/headblank.gif’) no-repeat top left; height: *; width: 195px }[/CODE]

I need the height to be 100%. I have tried everything, no repeat, repeat, using the style=”height: 100%” in the div

I need the image to go the full height of the cell, and the cell changes to.

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@WebJoelJan 15.2007 — -Why would you want to put a DIV inside of a TABLE? (Let me try something but I suspect that this isn't going to validate)...

#all .box-left {margin: 0; padding: 0; background: url('images/table/headblank.gif') no-repeat top left; height: *; width: 195px }

What you have here, is ID="all" with a CLASS="box-left"?? huh?

-Rethink what you are writing here and maybe not even bother with TABLE

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"

"http://www.w3.org/TR/html4/strict.dtd">

<html><head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<meta http-equiv="Content-Style-Type" content="text/css" />

<meta http-equiv="Content-Script-Type" content="text/javascript" />

<title></title>

<style type="text/css">

* {border:0; padding:0; margin:0;}

body {height:100%}

</style>

<script type="text/javascript"><!--

// -->

</script>

</head>

<body>

<div style="height:100%; width:195px; border:1px solid red; background: url('images/table/headblank.gif') no-repeat top left;">

</div>

</body>

</html>[/QUOTE]


In the <STYLE>, "body {height:100%;}" sets the height to 100%, so any 'container' in the HTML that [I]also[/I] set to 100%, does so (else IE will 'collapse' the height to contain the text, etc. inside of it).
Copy linkTweet thisAlerts:
@drhowarddrfineJan 15.2007 — Why would you want to put a DIV inside of a TABLE?[/QUOTE]WebJoel,

To carry on our previous conversation:

**sigh**
Copy linkTweet thisAlerts:
@WebJoelJan 16.2007 — Yes, -I hadn't meant for it to be rhetorical though. ? I was wondering why, if the OP required some inline style to 'style the DIV', that this could not be used [I]directly upon the 'container' and/or contents of said[/I] TD? I just figured that this is a legacy build being dragged, -kicking & screaming, -into becoming a CSS build. :rolleyes:

But yeah now I kinda see the tongue-in-cheek of it. ?
×

Success!

Help @Tabo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...