Getting DIV content to left left.

Chunkee

Lifer
Jul 28, 2002
10,391
1
81
Sorry for the weird title. Should have been left align.
For some reason I cannot get the contents of a DIV to left align. I have tried everything from justifying, aligning, padding and margins. Listed below is what I have for the div and title class.

div.note
{
border: 1px dashed #ff8c00;
mc-auto-number-class: noteTitle;
mc-auto-number-format: 'Note';
font: normal 10pt verdana;
margin-top: 10px;
padding-left: 4px;
padding-right: 4px;
padding-top: 6px;
padding-bottom: 4px;
}

span.noteTitle
{
color: #ff8c00;
background-color: #ffffff;
position: relative;
top: -14px;
margin-left: 9px;
padding-left: 4px;
padding-right: 4px;
}

Here is the result I am getting.

http://i49.photobucket.com/albums/f286/jcoria/divnotleftaligningcontent.png

Here is the source code for the element in the page.

<h2>More Information</h2>
<div class="note" MadCap:autonum="Note"><span class="autonumber"><span class="noteTitle">Note</span></span>Topics may contain a 'More Information' control. They are interactive and provide information for Related Tasks, Reference Information, etc. Some systems may contain custom groups of related information such as configuration elements. The More Information control functions the same as the Drop Down Text listed above.</div>

I am using an XML HAT, MadCap Flare.

Any suggestions would be greatly appreciated.

Thanks
 
Last edited:

Chunkee

Lifer
Jul 28, 2002
10,391
1
81
try to put a clear:right on the span

Thanks Ivan for the suggestion.

span.noteTitle
{
color: #ff8c00;
background-color: #ffffff;
position: relative;
top: -14px;
margin-left: 9px;
padding-left: 4px;
padding-right: 4px;
clear:right;
}

it does not work...

Not certain why. I am seeing it even as I type this in the Post Icons below this form..dont know why i cannot get it to work.
 

Aluvus

Platinum Member
Apr 27, 2006
2,913
1
0
You could perhaps replace the span with a floated-left div. The span is an inline element, which is (part of) why it is pushing the text over to the right.

Or use a fieldset instead, which I suppose is a slight hack.
 

Tweak155

Lifer
Sep 23, 2003
11,448
262
126
Looks like Note is pushing it to the right. Maybe pop a <br /> after note and see if the text aligns ok then figure it out from there.
 

Kr@n

Member
Feb 25, 2010
44
0
0
Your CSS rule "position: relative; top: -14px;" displace the span 14px upward, but as the "position: relative;" spec says, the browser renders content as if the span was still there.

You should use "position: relative;" on the containing div (to make sure subsequent absolute positioning is done relative to that bounding box), and place your span with "position: absolute;" and according coordinates. The "position: absolute;" CSS rule indeed removes the box from the flow, and the content is displayed as if the box wasn't here ...

All that said, I would still use a fieldset : this tag is exactly what you need, and has a sementical meaning (which means it has a specific "rendering" in oral browsers, accessibility properties, compatibility with older browsers, etc.)
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |