• 0

[HTML] Alignment


Question

Hello.

I have a page where information is being pulled from a database and then outputted. However, if the user adds in a bulleted or numbered list to their post, they don't align properly. This is happening in both IE and FF.

post-62680-1140738081.jpg

Here is the code before passing through the server:

<DIV class="PostView">
	<DIV class="PostViewHeader">
		&lt;DIV class="PostViewHeaderCount"&gt;Post #&lt;%Response.Write(count)%></DIV>;
		&lt;DIV class="PostViewHeaderDate"&gt;&lt;A name="&lt;%Response.Write(Replies("postID"))%>;%Response.Write(Replies("postID"))%>text-decoration: none;"&gt;&lt;%Response.Write(Replies("poDate"))%></A></DIV>V&gt;
	&lt;DIV class="PostViewContent"&gt;
		&lt;DIV class="PostViewContentSide"&gt;
			&lt;B&gt;&lt;%Response.Write(Replies("usUsername"))%></B><BR>Information Here
		&lt;/DIV&gt;
		&lt;DIV class="PostViewContentMain"&gt;
			&lt;DIV style="margin-left: 25px;"&gt;&lt;%Response.Write(Replies("poBody"))%></DIV>IV id="PostMenu" align="right"&gt;
				&lt;A href="PostEdit.asp?ForumID=<%Response.Write(ForumID)%>&ThreadID=<%Response.Write(ThreadID)%>&PostID=<%Response.Write(Replies("postID"))%>">Edit</A>ref="PostDelete.asp?ForumID=<%Response.Write(ForumID)%>&ThreadID=<%Response.Write(ThreadID)%>&PostID=<%Response.Write(Replies("postID"))%>">Delete</A>;/DIV&gt;
		&lt;/DIV&gt;
	&lt;/DIV&gt;
&lt;/DIV&gt;

Here is the code in the database to be output under "poBody":

Testing...&lt;br&gt;&lt;br&gt;&lt;ol&gt;&lt;li&gt;Okay.&lt;/li&gt;&lt;li&gt;Okay.&lt;/li&gt;&lt;li&gt;Yup.&lt;/li&gt;&lt;li&gt;Uh-huh.&lt;br&gt;&lt;/li&gt;&lt;/ol&gt;

Does anyone have any idea how to get the numbers to line up properly with the rest of the text? And not be undented further than the text?

Link to comment
https://www.neowin.net/forum/topic/435915-html-alignment/
Share on other sites

3 answers to this question

Recommended Posts

  • 0
  technoblinc said:

Sorry, I must not have described it well enough. I'm looking for the numbers to align with the text, not the text after the numbers to align with the text... Does that make any sense?

Still not explained that well, but I think I see what you're trying to do. Try setting the padding-left or margin-left property on the <ol> tag in your stylesheet to 20px (or more depending on how much you want to indent it) and see if that makes any difference. Alternatively, place the numeric list inside a div tag and set the margin or padding for that div to 20px. Your only other alternative is to not use the <ol> tag and just use php or asp to generate the numbers for your list.

Link to comment
https://www.neowin.net/forum/topic/435915-html-alignment/#findComment-587237302
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • At some point, hardware becomes obsolete and we cant blame vendors for dropping support. Much of the models dropped, run Intel hardware which means they can install something else on the device if they truly want to keep using it.
    • Well, that was fun: PS C:\WINDOWS\system32> Install-Script -Name Set-InetpubFolderAcl WARNING: Unable to download from URI 'https://go.microsoft.com/fwlin...627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7468 char:21 + ... $null = PackageManagement\Install-PackageProvider -Name $script:N ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider PackageManagement\Import-PackageProvider : No match was found for the specified search criteria and provider name 'NuGet'. Try 'Get-PackageProvider -ListAvailable' to see if the provider exists on the system. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7474 char:21 + ... $null = PackageManagement\Import-PackageProvider -Name $script:Nu ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (NuGet:String) [Import-PackageProvider], Exception + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.ImportPackageProvider WARNING: Unable to download from URI 'https://go.microsoft.com/fwlin...627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. PackageManagement\Get-PackageProvider : Unable to find package provider 'NuGet'. It may not be imported yet. Try 'Get-PackageProvider -ListAvailable'. At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:7478 char:30 + ... tProvider = PackageManagement\Get-PackageProvider -Name $script:NuGet ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ObjectNotFound: (Microsoft.Power...PackageProvider:GetPackageProvider) [Get-PackageProvider], Exceptio n + FullyQualifiedErrorId : UnknownProviderFromActivatedList,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackageProvider Install-Script : NuGet provider is required to interact with NuGet-based repositories. Please ensure that '2.8.5.201' or newer version of NuGet provider is installed. At line:1 char:1 + Install-Script -Name Set-InetpubFolderAcl + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: ( [Install-Script], InvalidOperationException + FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Install-Script
    • Because Apple has never discontinued Mac models before now?
    • I recall reading that they intend to synchronize the version numbers between iOS, tvOS and macOS, so we will also be getting macOS 26 up next.
    • every time.... why can't I install windows 11 on my 8088?
  • Recent Achievements

    • Week One Done
      abortretryfail earned a badge
      Week One Done
    • First Post
      Mr bot earned a badge
      First Post
    • First Post
      Bkl211 earned a badge
      First Post
    • One Year In
      Mido gaber earned a badge
      One Year In
    • One Year In
      Vladimir Migunov earned a badge
      One Year In
  • Popular Contributors

    1. 1
      +primortal
      488
    2. 2
      +FloatingFatMan
      257
    3. 3
      snowy owl
      247
    4. 4
      ATLien_0
      222
    5. 5
      +Edouard
      190
  • Tell a friend

    Love Neowin? Tell a friend!