Jump to content


Another CSS Problem...


7 replies to this topic

#1 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 03 July 2005 - 03:45 PM

http://v5.designbyja...ailtemplate.htm

Okay everything looked sexy, until I tried putting a larger image in to see if the div would expand when larger images are put in. To my horror, the image sticks out of the template, instead of being wrapped in the container.

I've tried everything I can think of (Adam can testify to that :)) and came up empty, any suggestions?

To see the problem, resize your browser window to 800x600 or under...

#2 adam123

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 2,306 posts
  • Location:London, UK
  • Interests:Programming and stuff.

Posted 03 July 2005 - 03:48 PM

Jaymz, on Jul 3 2005, 09:45 PM, said:

(Adam can testify to that :))
That was the best hour and a half ever :D

#3 raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 03 July 2005 - 03:52 PM

Maybe adding:
overflow-x: auto;

to your #image div? so it hoziontaly scrolls if the image is too big

#4 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 03 July 2005 - 04:34 PM

raenef, on Jul 3 2005, 05:52 PM, said:

Maybe adding:
overflow-x: auto;

to your #image div? so it hoziontaly scrolls if the image is too big
Tried that, with no success :)

#5 raenef

    Code Enforcer

  • Members
  • PipPipPip
  • 540 posts
  • Location:Battle Creek, Michigan
  • Interests:Web Development and Graphic Design

Posted 03 July 2005 - 04:50 PM

Okie I made a quick copy of the site for testing purposes, played around with the code a bit. And I found that if you do this in your css #image section
#image {text-align: center; padding-top: 10px; padding-bottom: 10px; clear: both; width: 100%; overflow: auto;}
it stays within the layout and scrolls in both firefox and ie, then if you dont like the vertical scroll-bar you could always hide that later with overflow-y:hidden;
Anywho it worked here, but whos ta say lols I just took the -x out of it and ploop. :)

#6 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 03 July 2005 - 05:24 PM

The problem is, I'm trying to avoid that, I want the layout to expand to fit the image :)

#7 coolaid

    P2L Jedi Master

  • Members
  • PipPipPipPip
  • 1,435 posts
  • Gender:Male
  • Interests:i wonder..

Posted 03 July 2005 - 05:52 PM

min-width: 800px;

or whatever the image size is. is a possible fix.

#8 Jaymz

    Retired P2L Staff

  • Members
  • PipPipPipPip
  • 4,104 posts

Posted 03 July 2005 - 05:58 PM

The image sizes will vary, I'm using this as a template for my PHP page :)

I've solved it, I added

display: table

to my container div and it works :)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users