473,403 Members | 2,222 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,403 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 1464
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.