iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-02-2005, 09:35 AM
Biggles's Avatar
WebProWorld Member
 
Join Date: Aug 2004
Posts: 68
Biggles RepRank 1
Default Problem with background image in CSS

i am converting an existing site to a css layout and scraping all the old messy tables layout ( sooo last year ! lol ) but i am having trouble getting a background image to go all the way down the left of the page here is my css code for the box:-


div#left {
width: 180px;
height: 100%;
background-position: left;
background-repeat: repeat-y;
background-image: url(images/bg03.gif);
position: absolute;
top: 110px;
bottom: 0px;
left: 0px;
margin: 0px 0px 0px 0px;
}


the hieght, however, only seems to go down the page about 500px ! dunno why. I have played about with the div tags position in the html but it has no effect other than getting worse. Anyone have any ideas?

here is the layout (a little snippet anyway):-


<div id="left">
<div id="menuleft">
<div id="menuleftitem">
**** link here ****
</div>
<div id="menuleftitem">
**** link here ****
</div>



<div id="boxtop">:: EXCLUSIVE ::</div>
<div id="boxmain">
**** links and text here ****
</div>



<div id="boxtop">:: TOP BRANDS ::</div>
<div id="boxmain">
**** links and text here ****
</div>
</div>
</div>


nb./ This is not inside any other div tags.

can post a link to prob page if needed.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 03-02-2005, 10:09 AM
Biggles's Avatar
WebProWorld Member
 
Join Date: Aug 2004
Posts: 68
Biggles RepRank 1
Default

after looking at it agin it seems to be giving me 100% of the viewable screen height (under ie nav bar at top to the 'page fold') rather than 100% of the web page height.

Any hints ?
Reply With Quote
  #3 (permalink)  
Old 03-02-2005, 11:12 AM
cthathem's Avatar
WebProWorld Member
 
Join Date: Sep 2003
Location: Austria, Graz
Posts: 36
cthathem RepRank 0
Default

If possible .. try the following: Set the background image for the body, not the div, .. that should work. I don't know if this will help you, but it's worth trying ;)

georg
Reply With Quote
  #4 (permalink)  
Old 03-02-2005, 11:21 AM
Biggles's Avatar
WebProWorld Member
 
Join Date: Aug 2004
Posts: 68
Biggles RepRank 1
Default

it works, kinda ! lol i tried it already but it spreads it accross the page aswell when all i want to do is spread it down ! Bring on the old tables ! lol
Reply With Quote
  #5 (permalink)  
Old 03-02-2005, 11:26 AM
Biggles's Avatar
WebProWorld Member
 
Join Date: Aug 2004
Posts: 68
Biggles RepRank 1
Default

Got it sussed now thanks.

I added the following to my css:-

BODY {
text-decoration: none;
font-size: 10pt;
font-family: Verdana, Helvetica, sans-serif;
margin: 0px 0px 0px 0px;
background: White url images/bg03.gif) repeat-y left;
}

the new bit is in red
Reply With Quote
  #6 (permalink)  
Old 03-02-2005, 11:27 AM
cthathem's Avatar
WebProWorld Member
 
Join Date: Sep 2003
Location: Austria, Graz
Posts: 36
cthathem RepRank 0
Default

yeah,... switching from a table based to a css based layout can be quite a pain in the neck. Mh, problem with height:100% is, that the % have to be based on the parent element. In your case that'll be body or some other element you wrap around the div.

Mh, .. I'm not quite sure what you want to achieve though... guess that code example is not the actual markup, is it? All in all it's a better idea to do the background stuff (whole site things) in the body.. so you can be sure that you affect the entire height.

georg
Reply With Quote
  #7 (permalink)  
Old 03-02-2005, 11:31 AM
cthathem's Avatar
WebProWorld Member
 
Join Date: Sep 2003
Location: Austria, Graz
Posts: 36
cthathem RepRank 0
Default

fine... be sure it's

background: White url('images/bg03.gif') repeat-y left top;

guess that's what it should look like! :)

enjoy,
georg
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 05:31 PM.



Search Engine Optimization by vBSEO 3.3.0