Web Design Forum: CSS float issues - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

CSS float issues

#1 User is offline   oneeyedpauly 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 298
  • Joined: 30-March 09
  • Reputation: 7
  • Gender:Male
  • Location:Kingsteignton
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 07 April 2009 - 12:07 PM

I am currently working on a new version of my web site and am having some css float issues. The test site (please remember this is still in development) is: http://www.retroedge...n.com/testsite/

The issues are as follows:

1/ On the following link image at bottom extends out over bottom of page:
http://www.retroedgewebdesign.com/testsite...t_portfolio.php

2/ I think this is the same issue as here with the right navigation menu:
http://www.retroedgewebdesign.com/testsite...phy_service.php

These are the main two issues, however I have also noticed that the menu items at the top of the page appear out of place in IE6 (see screen shot). Is this likely to be my coding or IE6 just being weird?

Attached File(s)


0

#2 User is online   n0xx 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 111
  • Joined: 24-March 09
  • Reputation: 0
  • Gender:Male
  • Location:Poland
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 07 April 2009 - 12:15 PM

add to content-footer css property clear:both; shoud fix your problem.
0

#3 User is offline   oneeyedpauly 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 298
  • Joined: 30-March 09
  • Reputation: 7
  • Gender:Male
  • Location:Kingsteignton
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 07 April 2009 - 12:30 PM

View Postn0xx, on Apr 7 2009, 13:15, said:

add to content-footer css property clear:both; shoud fix your problem.


I can't believe it was that simple.... thanks :)

Although now I have gaps where the background should be... grrr!
0

#4 User is online   n0xx 

  • Dedicated Member
  • PipPip
  • Group: Members
  • Posts: 111
  • Joined: 24-March 09
  • Reputation: 0
  • Gender:Male
  • Location:Poland
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 07 April 2009 - 12:36 PM

update this site and we will fix this too, but first i must see what's wrong.

try to add margin-bottom to this div with those images and to this div with this contact
0

#5 User is offline   mr p 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 325
  • Joined: 09-December 08
  • Reputation: 6
  • Gender:Male
  • Location:London
  • Experience:Advanced
  • Area of Expertise:Designer/Coder

Posted 07 April 2009 - 02:36 PM

far as i can see you just need to put the repeated background on your #content as well as, or instead of on #content-middle.

you may need to use the br {clear: both} trick just before you close the #content div if your floated images make it play up.
0

#6 User is offline   Gareth Daine 

  • Web Guru
  • Group: Platinum Membership
  • Posts: 1,646
  • Joined: 01-November 08
  • Reputation: 26
  • Gender:Male
  • Location:Cumbria, UK
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 07 April 2009 - 04:21 PM

Check out my article on Understanding CSS Floats to gain a grasp of how they work and why it's important to understand them.
0

#7 User is offline   bocaj 

  • Retired
  • PipPipPipPipPip
  • View gallery
  • Group: Members
  • Posts: 3,402
  • Joined: 11-January 09
  • Reputation: 99
  • Gender:Male
  • Location:New Sarum
  • Experience:Web Guru
  • Area of Expertise:Entrepreneur

Posted 07 April 2009 - 04:36 PM

I only checked the first link, idk wether it's sorted or not. But the problem is that your small image is the last image within the div.

So it's taking the bottom of this image as the end point for the div, which it's not. You need to finish the div with your larger image, and it will use the bottom of this image as the bottom of the div.

If that makes sense, plus it's more semantically correct to go left to right, so the last part of the content in the div should always be what's displayed in the bottom right.

See you have this


<p>Chronical Messiah are a P... their debut album cover.</p>
<img class="frame" height="368" width="368" alt="Chronical Messiah Album Cover" style="float: right;" src="images/chronical_messiah_album_cover.jpg"/>
<img class="frame" alt="Chronical Messiah Poster" src="images/poster001.jpg"/>
</div>


The Second to Last image you have there, you're floating right to push it over past the last image, which is un-semantic, and is causing your problem.

Just a simple, logical restructure would sort it.

<img class="frame" alt="Chronical Messiah Poster" src="images/poster001.jpg"/>
<img class="frame" height="368" width="368" alt="Chronical Messiah Album Cover"  src="images/chronical_messiah_album_cover.jpg"/>


So now the image you want on the right, is now semantically on the right, and your not forcing it anywhere, your letting the natural document flow take it there.

I hope this makes some vague sense, my ability to explain solutions well is a little lacking.
0

#8 User is offline   oneeyedpauly 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 298
  • Joined: 30-March 09
  • Reputation: 7
  • Gender:Male
  • Location:Kingsteignton
  • Experience:Advanced
  • Area of Expertise:Web Designer

Posted 07 April 2009 - 08:22 PM

View Postbocaj, on Apr 7 2009, 17:36, said:

I only checked the first link, idk wether it's sorted or not. But the problem is that your small image is the last image within the div.

So it's taking the bottom of this image as the end point for the div, which it's not. You need to finish the div with your larger image, and it will use the bottom of this image as the bottom of the div.

If that makes sense, plus it's more semantically correct to go left to right, so the last part of the content in the div should always be what's displayed in the bottom right.

See you have this


<p>Chronical Messiah are a P... their debut album cover.</p>
<img class="frame" height="368" width="368" alt="Chronical Messiah Album Cover" style="float: right;" src="images/chronical_messiah_album_cover.jpg"/>
<img class="frame" alt="Chronical Messiah Poster" src="images/poster001.jpg"/>
</div>


The Second to Last image you have there, you're floating right to push it over past the last image, which is un-semantic, and is causing your problem.

Just a simple, logical restructure would sort it.

<img class="frame" alt="Chronical Messiah Poster" src="images/poster001.jpg"/>
<img class="frame" height="368" width="368" alt="Chronical Messiah Album Cover"  src="images/chronical_messiah_album_cover.jpg"/>


So now the image you want on the right, is now semantically on the right, and your not forcing it anywhere, your letting the natural document flow take it there.

I hope this makes some vague sense, my ability to explain solutions well is a little lacking.


It makes perfect sense, thank you :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users