473,239 Members | 1,570 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,239 software developers and data experts.

Can't get my floats in a row...

Hi all!

I'm still learning the CSS ropes but am getting more ambitious by the
day, and more confident. However a seemingly simple problem has me
stumped. It concerns this page, from a site still in progress but
near completion.

http://adamabrams.com/spaprofits/media/02.html

And the CSS is here:

http://adamabrams.com/spaprofits/vok_07.css

On the page in question, I thought it would be a simple matter to have
the three elements - the menu, magazine cover and article text - line
up side by side. The text area is floated right, and I thought the
other two would just slide up alongside it.

Instead though, I've ended up (for the moment) having to give the
image a negative margin on the left and top to force it, kicking and
screaming, into place. It's a terribly kludgy and inflexible way to
achieve this, I know; I don't really want to do it this way... but
hey, it works for now, and I have to show it tomorrow!

I'm hoping someone can point out what I'm doing wrong - I'd like to
code this correctly... and I suspect it's something simple...

Many thanks,
adam

Oct 3 '07 #1
4 1459
On 3 Oct, 10:54, cosmo_canuck <adamabr...@shaw.cawrote:
I'm still learning the CSS ropes
Read http://brainjar.com/css/positioning/ yet?
http://adamabrams.com/spaprofits/media/02.html
Markups all over the place. Get a validator, fix that before even
beginning to worry about CSS details. Trying to tweak invalid code is
a mug's game.

* Use a HTML 4.01 Strict doctype

* No XML-like markup <br />

* No IE conditional crud <!--[if IE 5]>

* If you're going to use a WYSIWYG, don't expect it to work perfectly
<meta name="generator" content="Adobe GoLive 6">

* Don't use media=screen (You don't need it)

* Don't put fake comments inside the CSS stylesheet. Why?

* Don't link to an index page when you can simply link to the
directory <a href="../projects/index.html">

* WTF are ’ and — ?

* Use <div class="bodyWrapper"rather than <div id="bodyWrapper">
(it makes CSS selection easier)

Oct 3 '07 #2
On Oct 3, 3:17 am, Andy Dingley <ding...@codesmiths.comwrote:
On 3 Oct, 10:54, cosmo_canuck <adamabr...@shaw.cawrote:
I'm still learning the CSS ropes

Readhttp://brainjar.com/css/positioning/yet?
http://adamabrams.com/spaprofits/media/02.html

Markups all over the place. Get a validator, fix that before even
beginning to worry about CSS details. Trying to tweak invalid code is
a mug's game.

* Use a HTML 4.01 Strict doctype

* No XML-like markup <br />

* No IE conditional crud <!--[if IE 5]>

* If you're going to use a WYSIWYG, don't expect it to work perfectly
<meta name="generator" content="Adobe GoLive 6">

* Don't use media=screen (You don't need it)

* Don't put fake comments inside the CSS stylesheet. Why?

* Don't link to an index page when you can simply link to the
directory <a href="../projects/index.html">

* WTF are ’ and — ?

* Use <div class="bodyWrapper"rather than <div id="bodyWrapper">
(it makes CSS selection easier)

Oct 3 '07 #3
Thanks for the reply Andy, and your thorough comments on the site.
Readhttp://brainjar.com/css/positioning/yet?
I will now! 8^)
* No XML-like markup <br />
I somehow got the notion that this was superior but can't recall
why... happy to ditch it.
* If you're going to use a WYSIWYG, don't expect it to work perfectly
<meta name="generator" content="Adobe GoLive 6">
Still using GoLive on this project just for its global find-and-
change, and uploading capabilities. As a WYSIWYG editor for CSS-based
layouts, though, it's useless. I'm just previewing in a browser to see
what things look like.
* Don't put fake comments inside the CSS stylesheet. Why?
Not sure what you mean, there's just some comments serving as headers
to keep my sections organized... and maybe one or two from a bit of
borrowed code... ?
* WTF are ’ and — ?
HTML code for the single quote mark, and the long dash, respectively.
* Use <div class="bodyWrapper"rather than <div id="bodyWrapper">
(it makes CSS selection easier)
Hmmm, how? I assumed that these "one use only" div's should be ID's
and that the code would be pretty similar either way... am I wrong?

Thanks again!
adam

Oct 4 '07 #4
Thanks for pointing me in the right direction, and for the very clear
breakdown of float behaviour. My hope is restored!

Oct 4 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

50
by: dataangel | last post by:
I wrote a function to compare whether two strings are "similar" because I'm using python to make a small text adventure engine and I want to it to be responsive to slight mispellings, like...
8
by: Madhusudan Singh | last post by:
Is it possible to convert a very long list of strings to a list of floats in a single statement ? I have tried float(x) and float(x) but neither work. I guess I would have to write a loop if...
6
by: sbalko | last post by:
Hi, I am trying to read Java-floats (IEEE 754 encoding) stored in a binary file from C (gcc on linux/i386, more specifically). Unfortunately, C seems to expect floats to be stored somewhat...
7
by: Anton81 | last post by:
Hi! When I do simple calculation with float values, they are rarely exactly equal even if they should be. What is the threshold and how can I change it? e.g. "if f1==f2:" will always mean "if...
6
by: godavemon | last post by:
I need to take floats and dump out their 4 byte hex representation. This is easy with ints with the built in hex function or even better for my purpose def hex( number, size ): s =...
12
by: mast2as | last post by:
Hi everyone I am working on some code that uses colors. Until recently this code used colors represented a tree floats (RGB format) but recently changed so colors are now defined as spectrum....
3
by: freelanceinaz | last post by:
My problem page is at http://girlschorus.org/test.html I have a container with a relatively positioned graphic at the top, then two floats which are relatively positioned (for a a two-column...
23
by: Arnaud Delobelle | last post by:
Hi all, I want to know the precision (number of significant digits) of a float in a platform-independent manner. I have scoured through the docs but I can't find anything about it! At the...
1
by: donpro | last post by:
https://testbed.odysseyshipping.com/index.php This is driving me nuts. I've spent much time trying to style this page footer but because I cannot set widths using "display: inline". I've tried...
0
by: Matthieu Brucher | last post by:
2008/11/5 L V <somelauw@yahoo.com>: Hi, I don't think the Python developers list is th best list to post this kind of question. What version of Python did you use for this test? Matthieu
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.