Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 09-21-2008, 08:20 AM
marc_gfx marc_gfx is offline
Contributing Member
 
Join Date: 07-01-06
Posts: 126
iTrader: 0 / 0%
Floating without float

This may seem like an odd request, but maybe some of you have come accross this problem themselves. For my CMS I use an iframe to integrate content that needs to be transferred over https. I resize this iframe using javascript so that the scrollbars dont mess up the handling.

Now I have this one page that displays an unlimited amount of items (image + text wrapped by div or table, tried both). these items are placed in sequence using float:left. Layout is how I desire, but the resizing of the frame gets totally messed up. For some reason float-elements are not integrated properly into the window size calculations. So I end up with a scrollbar. I have not found any javascript solution for this issue, so maybe there is a html one.

I tried using display:inline, but that totally messes up the layout and does not properly simulate the float behaviour (its ok if its only one image, or one text item, but messes up for tables or a hierarchy of divs). Is there some tag that allows to define an item? Wrapping the content and then handling the item like an image would be desireable.

A javascript solution would also make me happy, but I kind of doubt to find one.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 09-22-2008, 01:27 AM
Boogle's Avatar
Boogle Boogle is offline
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 649
iTrader: 0 / 0%
are you specifying widths when using float? You should be using a specified size, therefore iframe size = amount of items * specified size.

BTW, do you have to use iframes? Man they stink!

Boog's
 
Reply With Quote
  #3  
Old 09-22-2008, 01:42 AM
marc_gfx marc_gfx is offline
Contributing Member
 
Join Date: 07-01-06
Posts: 126
iTrader: 0 / 0%
If I transfer everything via https this will include images and other insecure data resulting in complaints on the website, also slowing things down. the iframe seems to be the best solution to me, in terms of user-experience there should be no disadvantage. it also allows me to only pay for one and not multiple certificates.

the iframe size cant be determined with a calculation as the width is not fixed and the items can also be of varying size...
 
Reply With Quote
  #4  
Old 09-22-2008, 01:48 AM
Boogle's Avatar
Boogle Boogle is offline
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 649
iTrader: 0 / 0%
So, you have a https page, loading an i-frame from an http page? Am I wrong in thinking that if that's the case, everything is coming over https anyway?

Anyway just to say that, from my experience in creating bespoke CMS, using a set size to display items on a page always looks better than varying sizes, especially if there's borders/boxes around the items, it just looks messy and cluttered. Basically, you should ensure all images are the same size and that only a specific amount of chars are loaded into the preview items and then you have a 'click for more' link that takes you into detailed descriptions of the specific item??

Am I jumping the gun here anyway, It's kind of off-topic but basically, i'm sure W3C states that when floating widths must be specified.

HTH's

Boog's
 
Reply With Quote
  #5  
Old 09-22-2008, 05:03 AM
marc_gfx marc_gfx is offline
Contributing Member
 
Join Date: 07-01-06
Posts: 126
iTrader: 0 / 0%
nope, I have a http page loading an https page in an iframe (mostly member data, that I do not want to transfer insecurely). this also allows me to use whatever kind of domain I want in the window, but can transfer safely using the certificate and https with a different domain.

I prefer the dynamic page approach, it gets more complicated sure, but for large screens it allows better readability with custom font-sizes. It's not as clean maybe, but certainly more flexible. but i might have to go with some fixed approach as there is no dynamic solution to my problem so far...

@float must have width: why would the W3C state something like that? floating allows to adjust dynamically with the page, so stating a width does not seem to be a sensible requirement.
 
Reply With Quote
  #6  
Old 09-22-2008, 06:48 AM
Boogle's Avatar
Boogle Boogle is offline
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 649
iTrader: 0 / 0%
I can't be ar*ed to trapse through the content of w3c to check but i'm pretty sure that if you don't set a width when using float then it is automatically assumed that the width is 100%. this is not good if you have a div of size x and y items in this div all floated:right, you then have y*100% width.

Boog's
 
Reply With Quote
  #7  
Old 09-22-2008, 07:21 AM
marc_gfx marc_gfx is offline
Contributing Member
 
Join Date: 07-01-06
Posts: 126
iTrader: 0 / 0%
my experience shows it reacts more like the "display:inline", it just uses the width it requires, not more. but this really is off topic ...
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Float Help x360 Coding Forum 2 07-26-2007 05:51 PM
Making the page float !help! Wolverine Coding Forum 13 08-12-2006 04:26 PM
Floating Image sixty6 Coding Forum 4 06-29-2006 01:05 AM
Help with floating... spl1nter Coding Forum 3 09-12-2004 10:07 AM
CSS float in IE = no image visible? Shannon Web Design Lobby 10 08-28-2004 04:33 PM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 06:40 AM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC