I have a
<h1> tag that is set to float left, and the width is definitively set.
I also have a
<div> tag with some text in it that is set to float right, that ideally would start on the same level as the
However, for some reason, it's as if the
<h1> tag comes with a built-in
'clear: both;' because no matter what I try, the
<div> starts BELOW the
<h1> tag (on the next line).
What is up with this?
Edit 1: The webpage: http://redwoodprep.com/class_type/3
I want the top of the 'ACT' h1 tag to align with the top of the right-most div, which starts with 'Redwood's Customer Commitment' and has a gray background.
Edit 2: So, the float/margin thing worked on the page above, but i realized that wasn't the case i'd been trying to fix. The correct link should have been http://redwoodprep.com/class_type/1, which has a separate div with a title 'Complimentary Preparation Materials.' That is the troublesome page I haven't been able to fix...
Thanks for the help!
has the div a set width too?
try display:inline on the
<h1> tags are block elements. Changing the element to
display:inline should fix your woes. Then, you'll be able to set the div to
float:left instead of having multiple items thrown around in different directions away from the flow of the site.
I'd encourage you to use
display:inline-block because it will use parameters such as width, padding, margin, etc. (
display:inline does not; it follows the default rules of a
We need to see your actual code...
Something else must be at fault, or your source order needs to change... floated items need to come first, perhaps that's it? or float everything?
float the h1 and adjust the margin on the sidebar to suit.
or move the h1 into the leftmost column div.