Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning HTML, XHTML, CSS, and JavaScript
This is the forum to discuss the Wrox book Beginning HTML, XHTML, CSS, and JavaScript by Jon Duckett; ISBN: 978-0-470-54070-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning HTML, XHTML, CSS, and JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 13th, 2011, 09:55 AM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Sep 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CSS, Img, Border issues

So, I'm going crazy here.

I have an image that is included in my <div></div> for the page. The img is 700x553. When I set up the border of the div element, the img sticks out pass the border. Now, I can use height to fix that; however, then my other pages (no img) is too long.

I was closely following similar steps as from the example website created in this book for my base design, and I had a similar issue in Chapter 7 example when adding a border around the <div> element. However; after adding a defined width (960px)like in the book example, the border seemed to auto-adjust to the image in the sample webpage.

I cannot get that to work in my own sample. I have no clue why, and experimenting with different widths does not work. Again, height does, but that screws up my other pages using the stylesheet.

Any helpful advice regarding img stuff in CSS would be awesome. Basically, it seems like the img isn't getting treated as part of the <div> element, but I have no clue why or where to look to fix it. :(

Edit: Nevermind, figured it out. Absolute positioning fixed it on the div css property. Not sure why I had to use that when I didn't in the example site. :/

Last edited by OriginZero; September 13th, 2011 at 10:53 AM..
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IE Issues with CSS phpuser2000 CSS Cascading Style Sheets 0 December 19th, 2007 12:13 PM
HELP: CSS COLLAPSIBLE LIST ISSUES phpuser2000 CSS Cascading Style Sheets 0 December 13th, 2007 04:22 PM
IE layout issues with tables and border. dekemcaffee Javascript 1 October 9th, 2007 04:57 PM
CSS for Table border. rupen CSS Cascading Style Sheets 2 March 29th, 2006 09:41 AM
img maps and Border Colors interrupt CSS Cascading Style Sheets 2 September 10th, 2005 05:28 AM



All times are GMT -4. The time now is 05:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.