SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
Thread: Graphic Behavior in CSS
Hybrid View
-
Nov 9, 2003, 00:18 #1
- Join Date
- Sep 2003
- Location
- Arizona
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Graphic Behavior in CSS
If I have a 3 column layout that resizes the text and such to the page and res settings, is there a way to make CSS resize a graphic too? For example, if I have a page layout in CSS that is 775 pixels wide, and so is the graphic, what happens if the page is shrunk smaller than the width of the Graphic?
Thanks,
Shannon
-
Nov 9, 2003, 04:41 #2
- Join Date
- Aug 2002
- Location
- Burpengary, Australia
- Posts
- 4,495
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
This won't work in IE but it might in Moz/Opera so maybe it's worth a shot.
HTML Code:<img src="/path/to/img.png" alt="" style="width: 775px; max-width: 100%;" />
-
Nov 9, 2003, 04:47 #3
- Join Date
- Sep 2003
- Location
- Arizona
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks
Originally Posted by DJ P@CkMaN
-
Nov 9, 2003, 05:08 #4
- Join Date
- Sep 2003
- Location
- Arizona
- Posts
- 275
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanks!
Originally Posted by sdamos
-
Nov 9, 2003, 05:01 #5
- Join Date
- Jan 2003
- Location
- Hampshire UK
- Posts
- 40,556
- Mentioned
- 183 Post(s)
- Tagged
- 6 Thread(s)
Hi,
Just take the size out of the image tag and set the size in % with css.
Code:img {width:20%;height:8%}
Paul
Bookmarks